Merb、Bundler、RVM 和 1.9.1 = 无法找到 Gemfile (Bundler::GemfileNotFound)

发布于 2024-09-09 00:03:24 字数 1225 浏览 7 评论 0原文

任何人都可以建议如何解决此问题(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>'

谢谢

Chris


更新


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

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

挽容 2024-09-16 00:03:24

解决方案

我需要为我的应用程序编写一个 Gemfile 并将其放入应用程序的根目录中。

我升级了太多版本的 Merb!我的应用程序是一个扁平的 Rack 应用程序,最初是使用旧版本的 Merb 开发的。它没有(或不需要)Gemfile。当我针对最新的 Merb 运行它时,抛出了错误。如果它说“我找不到适合您的应用程序的 Gemfile”,那就更好了。

我运行了 merb-gen 来获取基本的 Gemfile,并根据自己的要求更新了它。

希望对某人有帮助!

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!

为人所爱 2024-09-16 00:03:24

看起来您需要一个 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 。

如果您要部署到 postgresql-server-dev-8.3,则

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文