[英]Ruby:no such file to load — coffee/rails
I am a ruby novice.I created my first ruby on rails application which named "HelloRubyWeb" on my mac.Then "cd HelloRuby",But when I input the command "rails s" ,it returned the error log: 我是一个红宝石新手。我在Mac上创建了我的第一个ruby on rails应用程序,名为“ HelloRubyWeb”。然后是“ cd HelloRuby”,但是当我输入命令“ rails s”时,它返回了错误日志:
/Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:74:in `require': no such file to load -- coffee/rails (LoadError)
from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:74:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:55:in `each'
from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:55:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler.rb:119:in `require'
from /Users/admin/Ruby/HelloRuby/config/application.rb:7
from /Library/Ruby/Gems/1.8/gems/railties-3.2.7/lib/rails/commands.rb:53:in `require'
from /Library/Ruby/Gems/1.8/gems/railties-3.2.7/lib/rails/commands.rb:53
from /Library/Ruby/Gems/1.8/gems/railties-3.2.7/lib/rails/commands.rb:50:in `tap'
from /Library/Ruby/Gems/1.8/gems/railties-3.2.7/lib/rails/commands.rb:50
from script/rails:6:in `require'
from script/rails:6
Can any one help me? 谁能帮我? Very thanks.
很感谢。
kasperite is probably right, in the terminal run: 在终端运行中,kasperite可能是正确的:
bundle
then run rails s
bundle
然后运行rails s
Post the errors you get if any. 发布您收到的错误(如果有)。
I had the same issue, but in my case it was because of the explicit coffee-rails version. 我遇到了同样的问题,但就我而言,这是因为显式的咖啡导轨版本。
1) remove strictly set version for coffee-rails
gem in Gemfile
1)在
Gemfile
删除coffee-rails
gem的严格设置版本
2) run bin/bundle
2)运行
bin/bundle
3) run bin/bundle update
3)运行
bin/bundle update
4) run bin/rails s
4)运行
bin/rails s
If you need explicitly set working version, just run bin/bundle show 'coffee-rails'
and copy the version number from the terminal. 如果需要明确设置工作版本,只需运行
bin/bundle show 'coffee-rails'
并从终端复制版本号即可。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.