我有一些宝石,包括ruby-debug在一个名为:development的捆绑组中.当我运行bundle命令时,这些gem被忽略,它只安装不在任何组中的gem.如何确保bundler不会忽略:development组中的gem?
编辑:这是我的Gemfile的样子.
source 'http://rubygems.org'
gem 'rails', '3.0.1'
# Auth gems
gem "devise", "1.1.3"
gem "omniauth"
# Bundle Mongoid gems
gem "mongoid", "2.0.0.beta.19"
gem "bson_ext"
# Asset gems
gem 'jquery-rails'
gem "jammit"
# Controller gems
gem 'inherited_resources', '1.1.2'
# View gems
gem 'haml'
gem 'formtastic', '~> 1.1.0'
# Nokogiri
gem "mechanize"
gem "json"
group :development do
gem "ruby-debug"
gem 'compass'
gem 'compass-colors'
gem 'pickler'
gem 'haml-rails'
gem 'rails3-generators'
gem "hpricot"
gem "ruby_parser"
gem 'fog'
end
Run Code Online (Sandbox Code Playgroud) 我的gemfile中有以下行:
gem 'client_side_validations', :git => "git@github.com:Dakuan/client_side_validations.git", :branch => "master", ref: '2245b4174ffd4b400d999cb5a2b6dccc0289eb67'
Run Code Online (Sandbox Code Playgroud)
它指向的repo是公共的,我可以在本地运行bundle install/update就好了.当我尝试推送到Heroku时,我收到以下错误:
Run Code Online (Sandbox Code Playgroud)Fetching git@github.com:Dakuan/client_side_validations.git Host key verification failed. fatal: The remote end hung up unexpectedly Git error: command `git clone 'git@github.com:Dakuan/client_side_validations.git' "/tmp/build_1xa9f06n4k1cu/vendor/bundle/ruby/1.9.1/cache/bundler/git/client_side_validations-56a04875baabb67b5f8c192c6c6743df476fd90f" --bare --no-hardlinks` in directory /tmp/build_1xa9f06n4k1cu has failed.
!!无法通过Bundler安装gem.!!Heroku推送拒绝,无法编译Ruby/rails应用程序
有人对这里发生的事情有任何想法吗?
我在一个旧的Rails项目中有一个Gemfile.我试图在Gemfile中添加一个gem,bundle install
但是出现了错误:
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
rails (= 3.0.0) ruby depends on
bundler (~> 1.0.0) ruby
Current Bundler version:
bundler (1.1.5)
This Gemfile requires a different version of Bundler.
Run Code Online (Sandbox Code Playgroud)
它使用的Rails版本需要捆绑器〜> 1.0.0但我安装了1.1.5并且正在将其用于我的其他项目.通常我会使用,bundle exec ...
但因为这是我们所说的捆绑器,它比这复杂一点.如何在我的Gemfile中添加gem并bundle install
在使用它所需的Bundler 版本时运行?
我正在使用ruby,我得到了一个带有一些ruby程序的zip文件,它说:在文件夹中,运行bundle install
以安装所需的软件包.
当我在终端中运行命令时,它说bundle command not found
.
有人可以给我详细说明如何解决这个问题吗?
我有一个基本的Rails 3应用程序在我的开发盒上本地工作,但是想要尽早测试部署以确保一切正常.我正在使用Capistrano进行部署.
当我运行cap deploy
(在所有其他必要的设置之后)时,它会在此命令中出现此错误:
[...]
* executing 'bundle:install'
* executing "bundle install --gemfile /var/www/trex/releases/20100917172521/Gemfile --path /var/www/trex/shared/bundle --deployment --quiet --without development test"
servers: ["www.[my domain].com"]
[www.[my domain].com] executing command
** [out :: www.[my domain].com] sh: bundle: command not found
command finished
[...]
Run Code Online (Sandbox Code Playgroud)
所以看起来它无法bundle
在服务器上找到命令.
但是,当我登录到服务器时......
$ ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux]
$ rails -v
Rails 3.0.0
$ bundle -v
Bundler version 1.0.0
Run Code Online (Sandbox Code Playgroud)
... bundle
命令工作正常.
怎么可能出错?
-
(此外,为了完整:)
$ which ruby
~/.rvm/rubies/ruby-1.9.2-p0/bin/ruby
$ which rails …
Run Code Online (Sandbox Code Playgroud) 我跑到gem update --system
更新到Rubygems 1.5.0,每次运行任何bundle
命令后我得到:
rvm/gems/ruby-1.8.7-p249/gems/bundler-1.0.9/lib/bundler/ui.rb:56: uninitialized constant Gem::SilentUI (NameError)
其他人遇到过这个问题吗?
我最近升级到10.10优胜美地测试版,但是我在安装Nokogiri时遇到了麻烦.我正在使用RVM和Ruby 1.9.3.我也按照这里的步骤尝试按照Nokogiri主页上的说明进行操作.
我通过自制程序安装了libxml2(2.9.1)和libxslt(1.1.28),并尝试使用我的Xcode 5安装和Xcode 6 beta中的命令行工具.
gem install nokogiri -v '1.5.5'
Building native extensions. This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
/Users/grantdavis/.rvm/rubies/ruby-1.9.3-p362/bin/ruby extconf.rb
checking for libxml/parser.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir …
Run Code Online (Sandbox Code Playgroud) 我从sudo bundle install命令获得以下输出:
Fetching source index for `http://rubygems.org/`
Could not reach rubygems repository `http://rubygems.org/`
Could not find gem 'rspec-rails (>= 2.0.0.beta.22, runtime)' in any of the gem sources.
Run Code Online (Sandbox Code Playgroud)
我正确设置了$ http_proxy并且我已经添加了gem:--http-proxy =我的代理到〜/ .gemrc.这些设置允许我的gem命令工作,我希望他们会转换为bundler,但没有这样的运气.
思考sudo可能不会继承我的所有环境,我也将这些设置添加到我的root用户,但是nada.
此时,bundler阻止我部署我的应用程序,我发现很少有其他人遇到这个问题.如果没有人有答案,我将被迫从我的Rails应用程序(我不介意做...)中破解捆绑器
我已经在Windows上安静地开发了几周没有添加任何宝石,今天我决定进行捆绑更新,但我无法通过这个名为therubyracer的宝石.我安装了devkit,它正在根据文档的验证程序工作.
我的问题是:有没有办法在Windows上安装这个宝石?
这个gem是否需要rails 3.1,这就是为什么现在我进行捆绑更新它会被"滑入"rails 3.0.8作为未来3.1迁移的早期启动手势?
# Gemfile
# source 'http://rubygems.org'
source :rubygems
gem 'rails'
gem 'rake', '0.8.7'
gem 'youtube_it'
gem 'panda'
gem "nifty-generators"
# gem "mongoid", "2.0.0.rc.7"
gem "mongoid"
gem "mongoid-eager-loading"
# gem 'mongoid_search'
gem "bson_ext", ">1.1.5"
gem 'devise'
gem 'cancan'
gem 'hirb'
# gem 'heroku'
gem 'rest-client'
gem 'less' # needs the more plugin
# gem 'hash_extension'
gem 'aws-s3', :require => 'aws/s3' # s3.rb
gem 'jquery-rails', ">= 0.2.7" # rails g jquery:install
# gem 'mongrel', ">= 1.2.0.pre2"
gem …
Run Code Online (Sandbox Code Playgroud) 如何强制Bundler重新安装我的gemfile中的所有gem?或者,我如何强制Bundler卸载它安装的所有gem,以便我自己重新安装它们?
我看到rails bundle干净了,但是这个问题解释了如何删除已安装bundle但不再在gemfile中的gem.
而如何利用打捆重新安装宝石介绍了如何重新安装一个宝石.我想立刻重新安装我的所有宝石.