Rails 4 打包器:找不到命令:rails
我猜这个答案已经在某处得到了回答,但我找不到它.我在安装 Rails 4
时遇到问题.我已经放入了 Gemfile
:
I am guessing that this answer has been already answered somewhere but I was not able to find it. I am having troubles with installing Rails 4
. I have put in the Gemfile
:
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.1'
并且我已经运行了 bundle install --path vendor/bundle
并且所有的 gems 都安装了,但是当我运行 bundle exec rails s
然后我收到一个错误:
And I have run bundle install --path vendor/bundle
and all the gems are installed, but when I run bundle exec rails s
then I receive an error:
bundler: command not found: rails
Install missing gem executables with `bundle install`
which rails
不返回任何内容.我正在使用 ruby 2.0.0
和 rvm
并且似乎一切都已设置.
which rails
doesn't returning anything. I am using ruby 2.0.0
and rvm
and it seems everything has been set up.
我缺少什么以及如何设置 Rails 4?
What am I missing and how to set-up Rails 4?
解决我的 Rails 4 问题的原因是在应用程序的根目录中运行一个命令:
What solved my problem for Rails 4, in this case, was running a command in the root directory of the application:
bundle exec rake rails:update:bin
之后,运行 bundle exec rails s
没有报告任何错误并且按预期工作.
After that , running a bundle exec rails s
reported no errors and was working as expected.