Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
davidrivers opened this issue Jan 16, 2010 · 5 comments
Open

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

davidrivers opened this issue Jan 16, 2010 · 5 comments

Comments

@davidrivers
Copy link

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!

@karmi
Copy link
Owner

karmi commented Jan 22, 2010

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

@davidrivers
Copy link
Author

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.

@vpereira
Copy link

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

@davidrivers
Copy link
Author

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

@karmi
Copy link
Owner

karmi commented Feb 15, 2010

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants