Project

General

Profile

no such file to load --bundler

Added by wi wengweng over 10 years ago

hi,all. I have got this issue for some days, but not yet solved. Can someone hlep?
this is what I get in my env:

root@factory:/var/log/redmine/default# gem -v
1.8.15
root@factory:/var/log/redmine/default# ruby -v
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
root@factory:/var/log/redmine/default# ra
rackup rails rake rake2thor ralsh ranlib rarp raw
root@factory:/var/log/redmine/default# rails -v
Rails 3.2.13

here is the error:

Ruby on Rails application could not be started
A source file that the application requires, is missing.

It is possible that you didn't upload your application files correctly. Please check whether all your application files are uploaded.
A required library may not installed. Please install all libraries that this application requires.

Further information about the error may have been written to the application's log file. Please check it in order to analyse the problem.

Error message:
no such file to load -- bundler
Exception class:
LoadError
Application root:
/usr/share/redmine
Backtrace: # File Line Location
0 /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb 36 in `gem_original_require'
1 /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb 36 in `require'
2 /usr/lib/ruby/vendor_ruby/phusion_passenger/utils.rb 325 in `prepare_app_process'
3 /usr/lib/ruby/vendor_ruby/phusion_passenger/classic_rails/application_spawner.rb 176 in `initialize_server'
4 /usr/lib/ruby/vendor_ruby/phusion_passenger/utils.rb 572 in `report_app_init_status'
5 /usr/lib/ruby/vendor_ruby/phusion_passenger/classic_rails/application_spawner.rb 174 in `initialize_server'
6 /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server.rb 204 in `start_synchronously'
7 /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server.rb 180 in `start'
8 /usr/lib/ruby/vendor_ruby/phusion_passenger/classic_rails/application_spawner.rb 149 in `start'
9 /usr/lib/ruby/vendor_ruby/phusion_passenger/spawn_manager.rb 219 in `spawn_rails_application'
10 /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server_collection.rb 132 in `lookup_or_add'
11 /usr/lib/ruby/vendor_ruby/phusion_passenger/spawn_manager.rb 214 in `spawn_rails_application'
12 /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server_collection.rb 82 in `synchronize'
13 /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server_collection.rb 79 in `synchronize'
14 /usr/lib/ruby/vendor_ruby/phusion_passenger/spawn_manager.rb 213 in `spawn_rails_application'
15 /usr/lib/ruby/vendor_ruby/phusion_passenger/spawn_manager.rb 132 in `spawn_application'
16 /usr/lib/ruby/vendor_ruby/phusion_passenger/spawn_manager.rb 275 in `handle_spawn_application'
17 /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server.rb 357 in `__send__'
18 /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server.rb 357 in `server_main_loop'
19 /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server.rb 206 in `start_synchronously'
20 /usr/share/phusion-passenger/helper-scripts/passenger-spawn-server 99


Replies (3)

RE: no such file to load --bundler - Added by wi wengweng over 10 years ago

after I install bundler:

These are the possible causes:

There may be a syntax error in the application's code. Please check for such errors and fix them.
A required library may not installed. Please install all libraries that this application requires.
The application may not be properly configured. Please check whether all configuration files are written correctly, fix any incorrect configurations, and restart this application.
A service that the application relies on (such as the database server or the Ferret search engine server) may not have been started. Please start that service.

Further information about the error may have been written to the application's log file. Please check it in order to analyse the problem.

Error message:
There was an error while trying to write to Gemfile.lock. It is likely that you need to allow write permissions for the file at path: /usr/share/redmine/Gemfile.lock (Bundler::InstallError)
Exception class:
PhusionPassenger::UnknownError
Application root:
/usr/share/redmine

RE: no such file to load --bundler - Added by wi wengweng over 10 years ago

but infact there is no Gemfile.lock file. so what may be the reason?

RE: no such file to load --bundler - Added by Rakon Thundarus over 10 years ago

Here is how I fixed the problem. I'm on Ubuntu 12.04 LTS server:

To fix the first problem:
sudo gem install bundler

To fix the second problem:
  • sudo touch /usr/share/redmine/Gemfile.lock
  • sudo chown www-data:www-data /usr/share/redmine/Gemfile.lock

I hope this helps. Ideally the best thing is to move the Gemfile.lock somewhere else in the configuration but this solution is minimally invasive on the ubuntu package.

    (1-3/3)