1

Can anyone suggest how to fix this (Ubuntu 9.10):

/home/chris/.rvm/gems/ruby-1.9.1-p378/gems/bundler-0.9.26/lib/bundler/shared_helpers.rb:42:in `default_gemfile': Could not locate Gemfile (Bundler::GemfileNotFound)
    from /home/chris/.rvm/gems/ruby-1.9.1-p378/gems/bundler-0.9.26/lib/bundler/shared_helpers.rb:51:in `env_file'
    from /home/chris/.rvm/gems/ruby-1.9.1-p378/gems/bundler-0.9.26/lib/bundler.rb:143:in `env_file'
    from /home/chris/.rvm/gems/ruby-1.9.1-p378/gems/bundler-0.9.26/lib/bundler.rb:174:in `update_env_file?'
    from /home/chris/.rvm/gems/ruby-1.9.1-p378/gems/bundler-0.9.26/lib/bundler.rb:95:in `load'
    from /home/chris/.rvm/gems/ruby-1.9.1-p378/gems/bundler-0.9.26/lib/bundler.rb:76:in `gem_setup'
    from /home/chris/.rvm/gems/ruby-1.9.1-p378/gems/merb-core-1.1.2/bin/merb:10:in `rescue in <top (required)>'
    from /home/chris/.rvm/gems/ruby-1.9.1-p378/gems/merb-core-1.1.2/bin/merb:3:in `<top (required)>'
    from /home/chris/.rvm/gems/ruby-1.9.1-p378/bin/merb:19:in `load'
    from /home/chris/.rvm/gems/ruby-1.9.1-p378/bin/merb:19:in `<main>'

Thank

Chris


Update


I tried really hard to get this to work. Eventually I fell back to merb-core 1.0.12 and that worked fine.

Chris McCauley
  • 25,824
  • 8
  • 48
  • 65

2 Answers2

1

Solution


I needed to write a Gemfile for my application and drop it into the root directory for the app.

I was upgrading across too many versions of Merb! My application was a flat, Rack application originally developed with a much older version of Merb. It didn't have (or need) a Gemfile. When I ran it against the latest Merb, the error was thrown. It would have been better if it said 'I can't find the Gemfile for your application'

I ran merb-gen to get a basic Gemfile and updated it with my own requirements.

Hope that helps someone!

Chris McCauley
  • 25,824
  • 8
  • 48
  • 65
0

Looks like you need a gem, and a dependency to build that gem. This might help, it helped me: postgres (on ubuntu) sudo apt-get install ruby-full build-essential postgresql-server-dev-8.3 (or 8.4) sudo gem install postgres

heroku uses postgresql-server-dev-8.3 if you're deploying there.

Mark Essel
  • 4,606
  • 2
  • 29
  • 47
  • Thanks for taking the time to answer. I don't think that's it though. A lot of people are having problems with the latest Merb and Bundler. – Chris McCauley Jul 16 '10 at 13:42
  • Oh well. I had a similar error message that's how I found your question with search and the additional gem installation made it work. I was spoiled by the older version of Heroku where most gems were installed by default. Best of luck. – Mark Essel Jul 19 '10 at 22:08