marley icon indicating copy to clipboard operation
marley copied to clipboard

no such file to load -- config/app/marley (LoadError)

Open davidrivers opened this issue 15 years ago • 5 comments

I followed the instructions, set up my app per the README, successfully deployed via capistrano, but I cannot start the server! I have no idea what gives! rake server:start appears to fire up thin, which immediately exits and dumps the following in thin's log file:

Exiting! /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require': no such file to load -- config/app/marley (LoadError) from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire' from config/config.ru:6 from /usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/builder.rb:46:in instance_eval' from /usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/builder.rb:46:ininitialize' from config/config.ru:1:in `new' from config/config.ru:1

I have tried for hours to get this to work by moving files around (even trying to have config.ru in both APP_ROOT/ and APP_ROOT/config/), attempting to override the rackup path in a thin config file to no avail, and even updating the rack and thin gems on my server to their latest versions. Nothing seems to work!

davidrivers avatar Jan 16 '10 05:01 davidrivers

Hi David,

sorry for the late reply. Apparently, your rackup cannot find the /app/marley.rb main application file. You should need only one rackup.ru in /config folder. Are you running the rake server:start from the main app directory?

Karel

karmi avatar Jan 22 '10 21:01 karmi

Why does marley's repository have the config.ru in the root marley directory and not in config? Having config.ru in the root marley directory, where it is by default, incurs the following error in log/thin.log:

/opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_r equire': no such file to load -- config/app/marley

However, moving config.ru into the config directory then incurs the following error in my log:

from config/config.ru:1:in `new' from config/config.ru:1

Exiting! /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- config/app/marley (LoadError)

The problem appears to be with Line 6 of config.ru:

require File.join(File.dirname(FILE), 'app', 'marley')

Instead of referencing app/marley.rb in the current directory, I need to reference it from the parent directory, but after much Googling I couldn't figure out how to do that.

davidrivers avatar Jan 31 '10 03:01 davidrivers

I fixed it doing moved the config.ru to the config directory i changed the line require File.join... to: require File.join(File.dirname(FILE),'..','app','marley') it worked for me

vpereira avatar Feb 13 '10 21:02 vpereira

vpereira, thank you so much! This did work for me!

davidrivers avatar Feb 14 '10 23:02 davidrivers

Hi David, yes, that's related to the last commit on master, there're some fixes dangling in the forks which I crappily enough haven't yet found time to incorporate, sorry for that...

karmi avatar Feb 15 '10 01:02 karmi