1

谁能建议如何解决这个问题(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>'

感谢

克里斯


更新


我非常努力地让它发挥作用。最终我回到了 merb-core 1.0.12 并且效果很好。

4

2 回答 2

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!

于 2010-12-06T15:50:23.610 回答
0

看起来您需要一个 gem,以及构建该 gem 的依赖项。这可能会有所帮助,它对我有帮助:postgres (在 ubuntu 上) sudo apt-get install ruby​​-full build-essential postgresql-server-dev-8.3(或 8.4) sudo gem install postgres

如果您在那里部署,heroku 使用 postgresql-server-dev-8.3。

于 2010-07-15T00:12:48.407 回答