Rails 4 打包器:找不到命令:rails [英] Rails 4 bundler: command not found: rails

查看:43
本文介绍了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.0rvm 并且似乎一切都已设置.

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.

这篇关于Rails 4 打包器:找不到命令:rails的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆