【发布时间】:2015-04-17 15:27:52
【问题描述】:
我创建了一个希望在我的服务器上运行的 Rails 应用程序。其他人在 Apache 服务器上创建了基本骨架,他们安装了 rvm、rails 等。 我拉了这个项目并一直在研究它,所以我创建了一个新的虚拟主机,并在我的 etc/hosts 中指向它。我认为的问题是,Passenger 将它作为我的用户名运行,但它会寻找具有不同环境的不同用户来运行我的网络应用程序。 我问其他人如何解决这个问题,他不知道。
我试过做 bundle 和 sudo bundle,然后推送到我的服务器(cyberduck),但它仍然给我同样的问题。
这是错误:
It looks like Bundler could not find a gem. Maybe you didn't install all the gems that this application needs. To install your gems, please run:
bundle install
If that didn't work, then the problem is probably caused by your application being run under a different environment than it's supposed to. Please check the following:
Is this app supposed to be run as the username user?
Is this app being run on the correct Ruby interpreter? Below you will see which Ruby interpreter Phusion Passenger attempted to use.
Please check whether the correct RVM gemset is being used.
Sometimes, RVM gemsets may be broken. Try resetting them.
-------- The exception is as follows: -------
Could not find globalid-0.3.5 in any of the sources (Bundler::GemNotFound)
/home/username2/.rvm/gems/ruby-2.2.1/gems/bundler-1.9.2/lib/bundler/spec_set.rb:92:in `block in materialize'
/home/username2/.rvm/gems/ruby-2.2.1/gems/bundler-1.9.2/lib/bundler/spec_set.rb:85:in `map!'
/home/username2/.rvm/gems/ruby-2.2.1/gems/bundler-1.9.2/lib/bundler/spec_set.rb:85:in `materialize'
【问题讨论】:
-
您必须在推送更新后的代码后,从服务器上的应用程序目录运行
bundle install。 -
@infused,感谢您的快速回复。我试过了,但仍然给我同样的错误。有没有办法让乘客知道?
标签: ruby-on-rails apache rvm passenger