什么bundle exec rake db:migrate意思?或者只是bundle exec rake <command>一般?
据我所知,bundle它负责维护Gemfile中的内容.我知道"exec"这个词是什么意思.我明白,rake你可以保留所有不同的脚本,我知道这db:migrate就是其中之一.我只是不知道这些话在一起做什么.为什么要bundle用来rake执行数据库迁移?
我正在编写Ruby on Rails 3教程书并在命令行上输入以下内容:
rake db:migrate
Run Code Online (Sandbox Code Playgroud)
产生了以下警告.
WARNING: Global access to Rake DSL methods is deprecated. Please Include
... Rake::DSL into classes and modules which use the Rake DSL methods.
WARNING: DSL method DemoApp::Application#task called at /Users/imac/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/railties-3.0.7/lib/rails/application.rb:215:in `initialize_tasks'
Run Code Online (Sandbox Code Playgroud)
我不知道该怎么做或如何使用它.我不知道Rake的任何其他命令.
我该如何解决这个问题?
可能重复:
Rails 3.0和Ruby 1.9.2rc:Rake命令返回'已初始化的常量'和堆栈级别太深的错误.有任何想法吗
我在Windows Vista上使用Ruby版本1.9.1.我正在使用任何rake命令得到rake aborted错误.这不会发生在我的所有app文件夹中.它只发生在特定的应用程序文件夹中.
C:\rails_project\stunetwork>rake db:reset
(in C:/rails_project/stunetwork)
rake aborted!
stack level too deep
C:/Ruby191/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2383:in `raw_load_rak
efile'
(See full trace by running task with --trace)
Run Code Online (Sandbox Code Playgroud)