Vin*_*ent 2 ruby-on-rails ruby-on-rails-3
我可以启动服务器/控制台,local
使用以下命令在环境中运行rake任务:
rails s -e local
rails c local
rake RAILS_ENV=local db:migrate
Run Code Online (Sandbox Code Playgroud)
我怎样才能rails generate (or rails g)
在local
环境中运行?
noo*_*odl 12
RAILS_ENV=local rails g ...
Run Code Online (Sandbox Code Playgroud)
应该工作.这是用shell设置env var而不是依赖于rails读取命令行选项.