Centos 5 Deployment Issues - no such file to load -- rubygems/dependency_list (MissingSourceFile)

154 views
Skip to first unread message

DJRavine

unread,
Nov 23, 2009, 1:20:20 AM11/23/09
to Phusion Passenger Discussions, Adan....@salmat.com.au
Hey All,

Firstly, Thank you very much for a wonderful module/gem for apache/
rails, you have done a great service to the development community,
keep the good work up... :D

Ok, on to business...

I have just setup a new subdomain on my server for a deployment of one
of my rails apps.
Everything appeared to install fine. there where no errors thrown
during the whole process.
But now when i browse to my website [ codebook.wowps.org ] i throws up
a MissingSourceFile error.

Error message:
no such file to load -- rubygems/dependency_list
(MissingSourceFile)

I did a locate on the file, and it appears to be in the correct
location.
/usr/local/lib/ruby/site_ruby/1.8/rubygems/dependency_list.rb

i have even placed,
ENV['GEM_PATH'] = "/usr/local/lib/ruby/gems/1.8/:/usr/local/lib/ruby/
site_ruby/1.8/:#{ENV['GEM_PATH']}"
Gem.clear_paths
into my environments.rb to try and set the $GEM_PATH manually and
still no luck

I was wondering if anyone could point me in the right direction to
resolve this error.
I have a feeling its just a bad or missing $ENV_VAR or something along
those lines.
Thank you all in advance and any help would be most appreciated.


-----------------------------------------------------------------------------------------------------------------------

SEE THE FULL BACKTRACE HERE: http://codebook.wowps.org

-----------------------------------------------------------------------------------------------------------------------

RubyGems Environment:
- RUBYGEMS VERSION: 1.3.5
- RUBY VERSION: 1.8.7 (2009-06-12 patchlevel 174) [i686-linux]
- INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /usr/local/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-linux
- GEM PATHS:
- /usr/local/lib/ruby/gems/1.8
- /root/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- :sources => ["http://gems.rubyforge.org/", "http://
gems.github.com"]
- REMOTE SOURCES:
- http://gems.rubyforge.org/
- http://gems.github.com



-----------------------------------------------------------------------------------------------------------------------
ERROR LOG FROM PASSENGER
-----------------------------------------------------------------------------------------------------------------------
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 -- rubygems/dependency_list
(MissingSourceFile)
Exception class:
PhusionPassenger::UnknownError
-----------------------------------------------------------------------------------------------------------------------


Message has been deleted

DJRavine

unread,
Dec 1, 2009, 9:22:24 PM12/1/09
to Phusion Passenger Discussions
So no one has an idea's on the cause of this?
And cannot suggest a solution?
This is pretty grim......

On Nov 25, 10:18 am, DJRavine <DJRav...@WoWps.org> wrote:
> anyone have any ideas..?
>
> This is driving me crazy...

Anuj Dutta

unread,
Dec 1, 2009, 9:44:05 PM12/1/09
to phusion-...@googlegroups.com


2009/12/2 DJRavine <DJRa...@wowps.org>

--

You received this message because you are subscribed to the Google Groups "Phusion Passenger Discussions" group.
To post to this group, send email to phusion-...@googlegroups.com.
To unsubscribe from this group, send email to phusion-passen...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/phusion-passenger?hl=en.



Can you post the entire error stack? Also, are you using apache or nginx?

Anuj

--
Anuj DUTTA

DJRavine

unread,
Dec 2, 2009, 2:18:45 AM12/2/09
to Phusion Passenger Discussions
Hello, and thank you for a response [i was getting worried]

Current setup is an APACHE2 on CENTOS 5 setup with DIRECTADMIN
I have setup a subdomin to handle ruby [ http://codebook.wowps.org ]

I have attempted to setup paths in the environment variables to link
the missing dependency.
--> Loading Rails v2.3.4...
--> Rails ENV['PATH'] = '/usr/kerberos/sbin:/usr/kerberos/bin:/usr/
local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/
local/lib/ruby/site_ruby/1.8/rubygems/'...
--> Rails ENV['GEM_PATH'] = '/root/.gem/ruby/1.8:/usr/local/lib/ruby/
site_ruby/1.8/rubygems/:'...
--> Rails ENV['GEM_HOME'] = '/usr/local/lib/ruby/gems/1.8:/usr/local/
lib/ruby/site_ruby/1.8/rubygems/:'...
--> Rails ENV['LOAD_PATH'] = '/usr/local/lib/ruby/site_ruby/1.8/:/usr/
local/lib/ruby/gems/1.8:/root/.gem/ruby/1.8:/usr/local/lib/ruby/
site_ruby/1.8/rubygems/:'...

The application loads perfectly fine via mongrel_rails, but it will
not find the dependency via passenger.

ENTIRE ERROR STACK
--------------------------------------------------------------------

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 -- rubygems/dependency_list
Exception class:
LoadError
Application root:
/home/railsdev/blog
Backtrace:
# File Line Location
0 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb
31 in `gem_original_require'
1 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb
31 in `require'
2 /home/railsdev/apps/blog/config/environment.rb 25
3 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb
31 in `gem_original_require'
4 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb
31 in `require'
5 /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.7/lib/
phusion_passenger/railz/application_spawner.rb 299 in
`preload_application'
6 /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.7/lib/
phusion_passenger/railz/application_spawner.rb 248 in
`initialize_server'
7 /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.7/lib/
phusion_passenger/utils.rb 255 in `report_app_init_status'
8 /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.7/lib/
phusion_passenger/railz/application_spawner.rb 233 in
`initialize_server'
9 /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.7/lib/
phusion_passenger/abstract_server.rb 194 in `start_synchronously'
10 /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.7/lib/
phusion_passenger/abstract_server.rb 163 in `start'
11 /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.7/lib/
phusion_passenger/railz/application_spawner.rb 209 in `start'
12 /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.7/lib/
phusion_passenger/spawn_manager.rb 262 in `spawn_rails_application'
13 /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.7/lib/
phusion_passenger/abstract_server_collection.rb 126 in
`lookup_or_add'
14 /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.7/lib/
phusion_passenger/spawn_manager.rb 256 in `spawn_rails_application'
15 /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.7/lib/
phusion_passenger/abstract_server_collection.rb 80 in `synchronize'
16 /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.7/lib/
phusion_passenger/abstract_server_collection.rb 79 in `synchronize'
17 /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.7/lib/
phusion_passenger/spawn_manager.rb 255 in `spawn_rails_application'
18 /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.7/lib/
phusion_passenger/spawn_manager.rb 154 in `spawn_application'
19 /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.7/lib/
phusion_passenger/spawn_manager.rb 287 in `handle_spawn_application'
20 /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.7/lib/
phusion_passenger/abstract_server.rb 352 in `__send__'
21 /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.7/lib/
phusion_passenger/abstract_server.rb 352 in `main_loop'
22 /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.7/lib/
phusion_passenger/abstract_server.rb 196 in `start_synchronously'
23 /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.7/bin/
passenger-spawn-server



On Dec 2, 12:44 pm, Anuj Dutta <dutta.a...@googlemail.com> wrote:
> 2009/12/2 DJRavine <DJRav...@wowps.org>
>
>
>
> > So no one has an idea's on the cause of this?
> > And cannot suggest a solution?
> > This is pretty grim......
>
> > On Nov 25, 10:18 am, DJRavine <DJRav...@WoWps.org> wrote:
> > > anyone have any ideas..?
>
> > > This is driving me crazy...
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "Phusion Passenger Discussions" group.> To post to this group, send email tophusion...@googlegroups.com.
> > To unsubscribe from this group, send email to>phusion-passen...@googlegroups.com<phusion-passenger%2Bunsu...@googlegroups.com>
> > .

joshua clingenpeel

unread,
Dec 2, 2009, 12:39:53 PM12/2/09
to phusion-...@googlegroups.com
Hello,

On Tue, Dec 1, 2009 at 11:18 PM, DJRavine <DJRa...@wowps.org> wrote:
> Hello, and thank you for a response [i was getting worried]
>
> Current setup is an APACHE2 on CENTOS 5 setup with DIRECTADMIN
> I have setup a subdomin to handle ruby [ http://codebook.wowps.org ]
>
> I have attempted to setup paths in the environment variables to link
> the missing dependency.
>  --> Loading Rails v2.3.4...
>  --> Rails ENV['PATH'] = '/usr/kerberos/sbin:/usr/kerberos/bin:/usr/
> local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/
> local/lib/ruby/site_ruby/1.8/rubygems/'...
>  --> Rails ENV['GEM_PATH'] = '/root/.gem/ruby/1.8:/usr/local/lib/ruby/
> site_ruby/1.8/rubygems/:'...
>  --> Rails ENV['GEM_HOME'] = '/usr/local/lib/ruby/gems/1.8:/usr/local/
> lib/ruby/site_ruby/1.8/rubygems/:'...
>  --> Rails ENV['LOAD_PATH'] = '/usr/local/lib/ruby/site_ruby/1.8/:/usr/
> local/lib/ruby/gems/1.8:/root/.gem/ruby/1.8:/usr/local/lib/ruby/
> site_ruby/1.8/rubygems/:'...
>
> The application loads perfectly fine via mongrel_rails, but it will
> not find the dependency via passenger.
>

Is it possible that you have one of the dependency gems installed for
your user account only? Try running `gem list -d` and looking at the
'Installed at:' value for each of the gems needed for your app. If one
of them isn't in the above paths then it won't be found by Passenger
(assuming you were following the steps outlined at
http://blog.phusion.nl/2008/12/16/passing-environment-variables-to-ruby-from-phusion-passenger/
for passing env vars to Passenger), but running mongrel would work
because you're doing it from a shell and it has access to all of the
gems for the given user. It's a good idea to remember to `sudo gem
install` your gems for this reason to make sure everything's in the
same place.
> To post to this group, send email to phusion-...@googlegroups.com.
> To unsubscribe from this group, send email to phusion-passen...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/phusion-passenger?hl=en.
>
>
>



--
Josh
Sent from Seattle, WA, United States
Message has been deleted
Message has been deleted

DJRavine

unread,
Dec 2, 2009, 8:34:24 PM12/2/09
to Phusion Passenger Discussions
Hi Josh,

I have thought of that, but all the gems have been installed with root
and from what i have read they should have access if installed by
root.
Correct me if i'm wrong tho :D

All gems are Installed at: /usr/local/lib/ruby/gems/1.8


Just an FYI, i own the whole server this is being setup on, so i have
root access.
I'm just running a DirectAdmin setup because i host alot of my own
websites.. ;)

DJRavine

unread,
Dec 8, 2009, 9:22:00 PM12/8/09
to Phusion Passenger Discussions
Hey All,

After trying multiple solutions i found hopping blogs I decided it was
prolly best to go back to the start. I will post my steps for anyone
else that may find this helpful. I removed all version of Ruby,
RubyGems [including all gems] and Passenger. Then my next step was to
install REE.

ruby -v [ ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-linux], MBARI
0x8770, Ruby Enterprise Edition 2009.10 ]

gem -v [ 1.3.5 ]

rails -v [ Rails 2.3.5 ]

After I installed REE it was fairly easy to work, as REE auto installs
RubyGems and the most common Gems...
During the Passenger installation I followed the prompts and added the
needed configs to httpd.conf...
After the installation was finished i updated my vhosts...

<VirtualHost *:80>
ServerName www.codebook.wowps.org
ServerAlias www.codebook.wowps.org codebook.wowps.org

# PASSENGER OPTIONS
PassengerHighPerformance on
RailsEnv development

DocumentRoot /home/railsdev/public_html/blog/public
<Directory /home/railsdev/public_html/blog/public>
AllowOverride all
Options -MultiViews
</Directory>
</VirtualHost>

FYI. the 'public_html' is a symbolic link. I have no need for
mod_rewrite at this point in time so 'PassengerHighPerformance on'. I
installed the rested of the gems my web app requires. and i restarted
httpd.

Then Passenger could not find the gems, i quickly determined this was
a permission problem. So after a quick chmod to the gem directory and
another httpd restart everything was working fine. I did still add the
following to my environment.rb file tho, just to be sure.

ENV['GEM_PATH'] = "/opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/
1.8:/root/.gem/ruby/1.8:#{ENV['GEM_PATH']}"
Gem.clear_paths

I hope this helps some one out as I was stuck for a while with my
first deployment. But its always the first one thats the hardest.
After I persevered, I found it was one of the most painless deploys i
have experianced.

A huge thankyou to the Phusion Team, Thank you again for the great
work you do.
Reply all
Reply to author
Forward
0 new messages