没有这样的文件要加载——捆绑程序/设置(Ruby on rails)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7270210/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-03 01:53:50  来源:igfitidea点击:

no such file to load -- bundler/setup (Ruby on rails)

ruby-on-railsruby

提问by Chris Muench

I am attempting to get a rails 3.0.5 app up and running at http://blastoserver.com/. You can see the errors there. (backtrace)

我正在尝试在http://blastoserver.com/ 上启动并运行 rails 3.0.5 应用程序。你可以在那里看到错误。(回溯)

Any ideas?

有任何想法吗?

回答by Matt

Try gem install bundler. If that doesn't work my guess would be that you're using two different rubyor rubygemsinstallations. The user running the webserver does not see the bundler gem.

试试gem install bundler。如果这不起作用,我的猜测是您正在使用两个不同的rubyrubygems安装。运行网络服务器的用户看不到 bundler gem。

回答by weexpectedTHIS

Make sure you are running "bundle exec ..." for example: "bundle exec rake -T" instead of just "rake -T". This makes sure that you are executing the command in the context of gem bundle.

确保您正在运行“bundle exec ...”,例如:“bundle exec rake -T”而不是“rake -T”。这确保您在 gem 包的上下文中执行命令。

For more info, look at: http://gembundler.com/

有关更多信息,请查看:http: //gembundler.com/

回答by andy kim

I guess you need 'bundle install' or forget rake db:migrate command.

我猜您需要“捆绑安装”或忘记 rake db:migrate 命令。

回答by Moritz Mair

If seems that it depends on the user. If you run this command on a ssh access as root user make sure not so use the "sudo" in the front. That fixed it for me.

如果似乎这取决于用户。如果您以 root 用户身份在 ssh 访问上运行此命令,请确保不要使用前面的“sudo”。那为我修好了。