簡體   English   中英

Ruby:沒有要加載的文件-coffee / rails

[英]Ruby:no such file to load — coffee/rails

我是一個紅寶石新手。我在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

誰能幫我? 很感謝。

在終端運行中,kasperite可能是正確的:

bundle然后運行rails s

發布您收到的錯誤(如果有)。

我遇到了同樣的問題,但就我而言,這是因為顯式的咖啡導軌版本。

1)在Gemfile刪除coffee-rails gem的嚴格設置版本

2)運行bin/bundle

3)運行bin/bundle update

4)運行bin/rails s

如果需要明確設置工作版本,只需運行bin/bundle show 'coffee-rails'並從終端復制版本號即可。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM