Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 把我的shell改为fish,现在rails不会加载服务器。我怎样才能让它运行?_Ruby On Rails_Ruby_Shell_Fish - Fatal编程技术网

Ruby on rails 把我的shell改为fish,现在rails不会加载服务器。我怎样才能让它运行?

Ruby on rails 把我的shell改为fish,现在rails不会加载服务器。我怎样才能让它运行?,ruby-on-rails,ruby,shell,fish,Ruby On Rails,Ruby,Shell,Fish,好吧,我只是把我的贝壳换成了鱼而不是我的zsh。我移除了我的zsh,一切都变得有点混乱。因此,我安装了rails并捆绑安装了我的应用程序,但当我尝试加载服务器时,出现了这个错误 /Library/Ruby/Gems/2.0.0/gems/actionview-4.2.0/lib/action_view/helpers.rb:40:in `<module:Helpers>': uninitialized constant ActionView::Helpers::ActiveModel

好吧,我只是把我的贝壳换成了鱼而不是我的zsh。我移除了我的zsh,一切都变得有点混乱。因此,我安装了rails并捆绑安装了我的应用程序,但当我尝试加载服务器时,出现了这个错误

/Library/Ruby/Gems/2.0.0/gems/actionview-4.2.0/lib/action_view/helpers.rb:40:in `<module:Helpers>': uninitialized constant ActionView::Helpers::ActiveModelHelper (NameError)
from /Library/Ruby/Gems/2.0.0/gems/actionview-4.2.0/lib/action_view/helpers.rb:4:in `<module:ActionView>'
from /Library/Ruby/Gems/2.0.0/gems/actionview-4.2.0/lib/action_view/helpers.rb:3:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/actionview-4.2.0/lib/action_view/base.rb:5:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/actionview-4.2.0/lib/action_view/view_paths.rb:1:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/actionpack-4.2.0/lib/abstract_controller/rendering.rb:4:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/actionpack-4.2.0/lib/action_controller/base.rb:204:in `<class:Base>'
from /Library/Ruby/Gems/2.0.0/gems/actionpack-4.2.0/lib/action_controller/base.rb:164:in `<module:ActionController>'
from /Library/Ruby/Gems/2.0.0/gems/actionpack-4.2.0/lib/action_controller/base.rb:5:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/responders-2.1.0/lib/responders/controller_method.rb:37:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/responders-2.1.0/lib/responders.rb:15:in `require'
from /Library/Ruby/Gems/2.0.0/gems/responders-2.1.0/lib/responders.rb:15:in `<module:Responders>'
from /Library/Ruby/Gems/2.0.0/gems/responders-2.1.0/lib/responders.rb:9:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.9.9/lib/bundler/runtime.rb:76:in `require'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.9.9/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.9.9/lib/bundler/runtime.rb:72:in `each'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.9.9/lib/bundler/runtime.rb:72:in `block in require'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.9.9/lib/bundler/runtime.rb:61:in `each'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.9.9/lib/bundler/runtime.rb:61:in `require'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.9.9/lib/bundler.rb:134:in `require'
from /Users/jay/current_projects/s/config/application.rb:9:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `require'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `block in server'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
/Library/Ruby/Gems/2.0.0/Gems/actionview-4.2.0/lib/action\u view/helpers.rb:40:in`':未初始化常量actionview::helpers::ActiveModelHelper(NameError)
来自/Library/Ruby/Gems/2.0.0/Gems/actionview-4.2.0/lib/action\u view/helpers.rb:4:in`'
来自/Library/Ruby/Gems/2.0.0/Gems/actionview-4.2.0/lib/action\u view/helpers.rb:3:in`'
from/Library/Ruby/Gems/2.0.0/Gems/actionview-4.2.0/lib/action\u view/base.rb:5:in`'
从/Library/Ruby/Gems/2.0.0/Gems/actionview-4.2.0/lib/action\u view/view\u path.rb:1:in`'
来自/Library/Ruby/Gems/2.0.0/Gems/actionpack-4.2.0/lib/abstract\u controller/rendering.rb:4:in`'
来自/Library/Ruby/Gems/2.0.0/Gems/actionpack-4.2.0/lib/action\u controller/base.rb:204:in`'
来自/Library/Ruby/Gems/2.0.0/Gems/actionpack-4.2.0/lib/action\u controller/base.rb:164:in`'
从/Library/Ruby/Gems/2.0.0/Gems/actionpack-4.2.0/lib/action\u controller/base.rb:5:in`'
来自/Library/Ruby/Gems/2.0.0/Gems/responders-2.1.0/lib/responders/controller_method.rb:37:in`'
from/Library/Ruby/Gems/2.0.0/Gems/responders-2.1.0/lib/responders.rb:15:in'require'
from/Library/Ruby/Gems/2.0.0/Gems/responders-2.1.0/lib/responders.rb:15:in`'
from/Library/Ruby/Gems/2.0.0/Gems/responders-2.1.0/lib/responders.rb:9:in`'
from/Library/Ruby/Gems/2.0.0/Gems/bundler-1.9.9/lib/bundler/runtime.rb:76:in'require'
from/Library/Ruby/Gems/2.0.0/Gems/bundler-1.9.9/lib/bundler/runtime.rb:76:require中的“块(2级)”中
from/Library/Ruby/Gems/2.0.0/Gems/bundler-1.9.9/lib/bundler/runtime.rb:72:in'each'
from/Library/Ruby/Gems/2.0.0/Gems/bundler-1.9.9/lib/bundler/runtime.rb:72:in'block in require'
from/Library/Ruby/Gems/2.0.0/Gems/bundler-1.9.9/lib/bundler/runtime.rb:61:in'each'
from/Library/Ruby/Gems/2.0.0/Gems/bundler-1.9.9/lib/bundler/runtime.rb:61:in'require'
from/Library/Ruby/Gems/2.0.0/Gems/bundler-1.9.9/lib/bundler.rb:134:in'require'
from/Users/jay/current_projects/s/config/application.rb:9:in`'
from/Library/Ruby/Gems/2.0.0/Gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in'require'
from/Library/Ruby/Gems/2.0.0/Gems/railties-4.2.0/lib/rails/commands/commands\u tasks.rb:78:in“服务器中的块”
from/Library/Ruby/Gems/2.0.0/Gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in'tap'
from/Library/Ruby/Gems/2.0.0/Gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in'server'
from/Library/Ruby/Gems/2.0.0/Gems/railties-4.2.0/lib/rails/commands/commands\u tasks.rb:39:in'run\u command!'
from/Library/Ruby/Gems/2.0.0/Gems/railties-4.2.0/lib/rails/commands.rb:17:in`'
来自脚本/rails:6:in'require'
来自脚本/rails:6:in`'

这里指向
/Library/Ruby/Gems/2.0.0/Gems/
,但我使用rbenv。我不确定它是否应该查看rbenv的内部

D-side在上面的评论中给出了这个链接

将这些垫片添加到我的config.fish中修复了问题:

set PATH $HOME/.rbenv/bin $PATH
set PATH $HOME/.rbenv/shims $PATH
rbenv rehash >/dev/null ^&1

嗯,是的,
rbenv-fish
在谷歌上输出了大量的结果。。。也就是说,我用的是RVM,如果它能工作的话,你可以自己发布一个答案。谢谢,我从来没有真正定制过这个外壳,而且已经有一年多的时间使用zsh了。所以当我试着吃鱼的时候,速度要快得多,但我真的不知道为什么所有东西都坏了。谢谢你的链接,解决了我的问题。是的,目前也在使用zsh,但正在考虑切换。Zsh带有抗原岩石,但鱼以其“阴影自动完成”吸引了我的注意。如果有一天我能用这些rvm,nvm和其他东西把它设置好。。。