我正在尝试建立自己的VPS(Ubuntu 14.04),并且几乎成功了(我希望!)。
我正在使用乘客,Rails和Apache。当我浏览到我的IP时,我得到了一个GemError包,但是当我在我的机器上运行bundle install时,它告诉我它正在使用所有的gem。
问题首先发生在json gem上,这是第一个宝石。当我手动将“gem json,1.8.3”添加到我的Gemfile时,错误转到列表的第二个gem,minitest。
顶部有两个奇怪的消息可能是问题,但我真的不理解这些消息:
Ignoring executable-hooks-1.3.2 because its extensions are not built. Try: gem pristine executable-hooks --version 1.3.2
Ignoring gem-wrappers-1.2.7 because its extensions are not built. Try: gem pristine gem-wrappers --version 1.2.7
Could not find minitest-5.6.1 in any of the sources (Bundler::GemNotFound)
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler/spec_set.rb:92:in `block in materialize'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler/spec_set.rb:85:in `map!'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler/spec_set.rb:85:in `materialize'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler/definition.rb:140:in `specs'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler/definition.rb:185:in `specs_for'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler/definition.rb:174:in `requested_specs'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler/environment.rb:18:in `requested_specs'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler/runtime.rb:13:in `setup'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler.rb:127:in `setup'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler/setup.rb:18:in `<top (required)>'
/usr/local/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/usr/local/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:399:in `activate_gem'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:277:in `block in run_load_path_setup_code'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:404:in `running_bundler'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:276:in `run_load_path_setup_code'
/usr/share/passenger/helper-scripts/rack-preloader.rb:99:in `preload_app'
/usr/share/passenger/helper-scripts/rack-preloader.rb:153:in `<module:App>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:28:in `<main>'
答案 0 :(得分:2)
此处为乘客作者。此错误通常表示以下两种情况之一:
public function actionView($myid)
{
...
}
以明确指定用户。passenger_user
以显式设置应该使用的Ruby解释器的路径。如果全部失败,请尝试我们的new end-to-end deployment walkthrough。它应该有保证(假设您从头开始并使用最新的Passenger版本)。