Tag: 捆绑器

使用“omniauth-oauth2”捆绑安装错误

运行bundle install我收到以下错误(完整跟踪: http : //pastebin.com/Vp4nHc2p ): Bundler could not find compatible versions for gem “omniauth-oauth2”: In Gemfile: omniauth-facebook (~> 1.2.0) ruby depends on omniauth-oauth2 (~> 1.0.0) ruby omniauth-github (~> 1.0.1) ruby depends on omniauth-oauth2 (1.1.1) 要查看我的Gemfile: http ://pastebin.com/vMcHDHa8 知道怎么解决吗?

从我的rails应用程序中调用rubygem的二进制可执行文件?

我知道bundler使用bundle exec命令使gems可执行文件可用。 我想了解如何从控制器动作或模型类方法中调用这些可执行文件? 我在Bundler doco中没有看到任何关于此的内容。

无法在任何来源中找到mime-types-1.25.1(Bundler :: GemNotFound)

在将app部署到生产服务器时,我导航到URL并Could not find mime-types-1.25.1 in any of the sources (Bundler::GemNotFound).错误Could not find mime-types-1.25.1 in any of the sources (Bundler::GemNotFound). gem肯定在那里,但它仍然没有找到。 $ bundle show mime-types /usr/local/rvm/gems/ruby-1.9.3-p484/gems/mime-types-1.25.1 正如在这里解释的那样, Heroku推送拒绝:在源代码中找不到jquery-rails-2.0.0删除Gemfile.lock是错误的,这个版本的mime-types是最新版本。

rails console无法找到已安装的gem

$ bundle install |grep chunk Using chunky_png 1.3.3 $ rails c Could not find chunky_png-1.3.3 in any of the sources Run `bundle install` to install missing gems. 我已经尝试从rvm gemset中删除所有gem并重新运行捆绑两次,但没有帮助。 有任何想法吗? 这是在Ubuntu 13.10机器上。 我的Mac OSX机器上的相同代码工作正常。

缺少一个恒定的负载..我怎么能绕过这个?

我刚刚为rails 2.3.5 Spree项目安装了bundler。 在这样做之后,我意识到当我去script/console时我收到了这个错误: Loading development environment (Rails 2.3.5) /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:105:in `const_missing’:NameError: uninitialized constant Rails::Plugin::OpenID 我的Gemfile: gem ‘ruby-openid’, ‘2.1.8’ 我运行bundle install没有错误。 >> gem list -d ruby​​-openid *** LOCAL GEMS *** ruby-openid (2.1.8, 2.1.2) Author: JanRain, Inc Homepage: http://github.com/openid/ruby-openid Installed at (2.1.8): /Library/Ruby/Gems/1.8 (2.1.2): /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8 完整的Backtrace /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:105:in `const_missing’: uninitialized constant Rails::Plugin::OpenID (NameError) from /Users/macuser/Sites/test/spree/vendor/plugins/open_id_authentication/init.rb:16:in `evaluate_init_rb’ from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:182:in […]

使用bundle exec运行脚本很慢

使用bundle exec运行时 $ time bundle exec rails generate model student name:string age:number invoke active_record create db/migrate/20121215170617_create_students.rb create app/models/student.rb real 0m13.397s user 0m11.676s sys 0m0.597s 直接跑 $ time rails generate model student name:string age:number invoke active_record create db/migrate/20121215171018_create_students.rb create app/models/student.rb real 0m6.408s user 0m5.783s sys 0m0.510s $ ruby -v ruby 1.9.3p286 (2012-10-12 revision 37165) [x86_64-linux] 所以,正常的命令需要6秒,但是使用bundle […]

ROR 3.1:捆绑更新失败(eventmachine gem)

请帮助我解决bundle和gem依赖关系。 Windows 7上的RoR。我正在尝试运行捆绑包更新,但在更新过程中,我得到: Italling eventmachine(0.12.10)与原生扩展不幸的是,发生了致命错误。 请通过https://github.com/carlhuda/bundler/issues向Bundler问题跟踪器报告此错误,以便我们对其进行修复。 谢谢! C:/RailsInstaller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:529:在build_extensions中的`rescue in block中:’错误:无法构建gem原生扩展。 (Gem :: Installer :: ExtensionBuildError).. 捆绑包更新此时停止。 瘦Web服务器需要Eventmachine。 我手动安装了事件机器:gem install eventmachine –pre 在我的gemfile中我得到了: gem ‘thin’ (nothing about eventmachine) 在我的gemfile.lock中进行bundle install / update之后: … eventmachine (1.0.0.beta.4.1-x86-mingw32) … thin (1.2.11-x86-mingw32) daemons (>= 1.0.9) eventmachine (>= 0.12.6) rack (>= 1.0.0) .. DEPENDENCIES eventmachine rails (= 3.1) …. thin 如果我运行“捆绑安装”就可以了 […]

如何避免’没有这样的文件加载 – map_by_method’脚本/控制台与bundler?

我正在运行带有捆绑器的 rails 2.3.10 。 我使用rvm ,在全球gem中通常我把gem用于irb。 默认情况下我有这些:map_by_method,what_methods,ap,net-http-spy,hirb,looksee,pp,wirble。 当我启动irb时,它所需要的gem对它来说是可用的,并且事情看起来应该如此。 但是,当我启动脚本/控制台时,它无法访问当前rvm gemset中的gems,只能访问Gemfile中定义的Gemfile 。 我收到消息no such file to load — map_by_method 。 显然我不想把那些irb特定文件放到我的Gemfile 。 你知道某种方式,如何说服脚本/控制台使用捆绑器外的gem?

在bundler ruby​​版本中指定一个范围

有没有办法为ruby版本指定范围? ruby ‘~> 2.1.0’ Your Ruby version is 2.1.1, but your Gemfile specified ~> 2.1.0 ruby ‘>= 2.1.0’ Your Ruby version is 2.1.1, but your Gemfile specified >= 2.1.0 显然,范围适用于gem,但也许它不可能用于ruby版本。 或者我的语法错了?

如何告诉bundler忽略不存在的gem?

我的组织有许多内部gem,用于自动化测试,但不是生产部署所必需的。 我正在尝试使用Bundler,因此在我的Gemfile中我将这些gem包装在: group :test, :development do gem ‘dashboard_summary’ end 但是,当我跑: $ bundle install –without staging development test 我还是得到了 Could not find gem ‘dashboard_summary (>= 0) ruby’ in the gems available on this machine. 我试图理解为什么Bundler在我告诉它的时候并没有忽略那个gem。