Tuesday, May 15, 2012

Could not find multi_json in any sources

This just means that passenger is not reading the right ruby version or gemset or both.

I went through a lot of trouble to get this fixed. I ran rvm implode which removes rvm and all rubies. I then reinstalled it all. Reinstalled passenger gem and compiled it as well (passenger-install-apache-module).

I then created a .rvmrc file and said rvm use 1.9.3@mygemsetname. I changed directory to the app and ran bundle install. This is when I got the error again, so I thought a little more and just removed the rvmrc and ran bundle install again and that fixed it.

My apache conf file was:

   LoadModule passenger_module /Users/cgunnels/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/ext/apache2/mod_passenger.so
   PassengerRoot /Users/cgunnels/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12
   PassengerRuby /Users/cgunnels/.rvm/wrappers/ruby-1.9.3-p194/ruby

So I'm guessing that because I didn't specify a gemset in the apache conf in was reading the wrong gem list.

cannot load such file -- somerubyfile

Error message: 

cannot load such file -- config/init

Backtrace:
line 3: config.ru

So I was trying to load a sinatra app and I had this error keep coming up. I found out that all you have to do is add "./" to the front of the require like "./config/init" and all will load just fine.

Using:
ruby 1.9.3p194
Phusion Passenger version 3.0.12
sinatra (1.3.2)

Passenger encountered the following error: The application spawner server exited unexpectedly: Unexpected end-of-file detected.

For me I install the passenger gem with the --pre flag and that caused the problem. I just reinstalled it without the flag and this error went away for me.

I am using Mac OSX 10.7.3