`default_gemfile':找不到Gemfile(Bundler :: GemfileNotFound)

时间:2014-03-11 06:38:54

标签: ruby merb

我是使用ruby 1.8.7版本的merb上的ruby新手。同时运行它显示的应用程序

`default_gemfile': Could not locate Gemfile (Bundler::GemfileNotFound) 
    from /home/subrahmanyam/.rvm/gems/ruby-1.8.7-p374@global/gems/bundler-1.5.3/lib/bundler.rb:242:in `default_gemfile'
    from /home/subrahmanyam/.rvm/gems/ruby-1.8.7-p374@global/gems/bundler-1.5.3/lib/bundler.rb:188:in `root'
    from /home/subrahmanyam/.rvm/gems/ruby-1.8.7-p374@global/gems/bundler-1.5.3/lib/bundler.rb:98:in `bundle_path'
    from /home/subrahmanyam/.rvm/gems/ruby-1.8.7-p374@global/gems/bundler-1.5.3/lib/bundler.rb:395:in `configure_gem_home_and_path'
    from /home/subrahmanyam/.rvm/gems/ruby-1.8.7-p374@global/gems/bundler-1.5.3/lib/bundler.rb:89:in `configure'
    from /home/subrahmanyam/.rvm/gems/ruby-1.8.7-p374@global/gems/bundler-1.5.3/lib/bundler.rb:150:in `definition'
    from /home/subrahmanyam/.rvm/gems/ruby-1.8.7-p374@global/gems/bundler-1.5.3/lib/bundler.rb:115:in `setup'
    from /usr/bin/merb:10

当我尝试安装'rvm ruby​​gems 1.4.2'时,它会显示如

之类的消息
Installed rubygems 2.0.14 is newer then 1.4.2, skipping installation, use --force to force installation'

这是要求您尽早提供解决方案。请帮我。 提前致谢

2 个答案:

答案 0 :(得分:0)

如果你是Ruby的新手,你不应该使用1.8.7。它不再是支持者,你将遇到的问题超出你现在所拥有的问题。升级到Ruby 2.1.1:

rvm get stable
rvm install 2.1.1

然后找到你的项目并通过运行安装你的宝石:

bundle install

答案 1 :(得分:0)

我遇到了这个问题,试图让TextMate 2使用Cucumber捆绑 https://github.com/cucumber/cucumber-tmbundle

我正在使用与 TM_RUBY 设置为 .rvm / bin / rvm_auto_ruby 的rvm集成,但黄瓜无法解析。我最终将 BUNDLE_GEMFILE GEM_HOME 硬编码到“运行功能”和“运行单一场景”命令中:

ENV['BUNDLE_GEMFILE'] = ENV['TM_PROJECT_DIRECTORY'] + '/Gemfile'
ENV['GEM_HOME'] = '/Users/my/.rvm/gems/ruby-1.9.3-p448@monaco-mongoid3'

无论如何,希望能帮助别人。