Tag: rubygems

我如何在Ubuntu 10.4上获得RubyGems 1.3.6

我刚安装了Ubuntu 10.4和Ruby1.9.1的新vm(VirtualBox)。 我已经得到了RUbyGems1.9.1的软件包,但是当我做了gem – 我仍然得到1.3.5。

RVM Ruby 1.9.1安装无法findzlib,但其运行时和开发库在那里

尝试让Ruby 1.9.1在全新安装(Fedora)上运行并运行RVM。 在做rvm install 1.9.1 ,rubygems错误日志显示zlib不能被find 没有这样的文件加载 – zlib(LoadError) 但是,zlib运行时和开发库都已安装并且是最新的。 我现在有点不知所措。

我应该在我的Gemfile中指定确切的版本吗?

我注意到在rubygems.org上有很多gembuild议你用主版本而不是确切版本来指定它们。 例如… haml-rails gem … gem "haml-rails", "~> 0.3.4" # "$ bundle install" will acquire the # latest version before 1.0. 不过,根据Bundler文档 ,我觉得最好能find像这样的确切版本。 gem "haml-rails", "0.3.4" 所以你的haml-railsgem,它的所有依赖不会漂移。 如果几个星期后在另一台计算机上签出项目并运行$ bundle install您将拥有与指定的所有内容完全相同的版本。 我已经看到了点发布的东西,我认为Bundler的整个想法的一部分是“ Bundle.lock ”所有的gem版本。 但是在rubygems.org上,他们使用“〜”很多,所以我可能错过了一些东西? 任何澄清将有助于我理解Bundler和gempipe理。

我如何使用RVM创build全球可用的gem?

我正在运行Mac OSX 10.6.4并安装了RVM。 到目前为止,它是非常棒的,我真的很喜欢它让我pipe理多个版本的rails和ruby在同一台机器上,而不会头疼! 但是,我不想为每个设置安装某些gem(例如乘客)。 有没有办法在gemsets之间分享gem? 我有一个1.8.7@rails2.3.8和1.9.2@rails3,我可以安装gem,如乘客,mysql和capistrano一次,并使用所有版本?

RVM Bundle安装缺lessGem错误,即使安装了Gem

即使我目前已经安装了Bundler gem(当我运行$ gem list时出现),我得到以下错误。 ERROR: Gem bundler is not installed, run `gem install bundler` first. 我正在使用RVM,我的$ PATH如下所示: /Users/cjstingl/.rvm/gems/ruby-1.9.2-p290@rails3tutorial2ndEd/bin: /Users/cjstingl/.rvm/gems/ruby-1.9.2-p290@global/bin: /Users/cjstingl/.rvm/rubies/ruby-1.9.2-p290/bin: /Users/cjstingl/.rvm/bin: /Users/cjstingl/.bin: /usr/local/sbin: /usr/local/Cellar/php/5.3.6/bin: /usr/local/share/python: /usr/bin: /bin: /usr/sbin: /sbin: /usr/local/bin: /usr/X11/bin 这也是我的gem环境 RubyGems Environment: – RUBYGEMS VERSION: 1.8.15 – RUBY VERSION: 1.9.2 (2011-07-09 patchlevel 290) [x86_64-darwin11.2.0] – INSTALLATION DIRECTORY: /Users/cjstingl/.rvm/gems/ruby-1.9.2-p290@rails3tutorial2ndEd – RUBY EXECUTABLE: /Users/cjstingl/.rvm/rubies/ruby-1.9.2-p290/bin/ruby – […]

安装Jekyll – 原生扩展版本时出错

我在安装jekyll时遇到了一些麻烦。 不能完全弄清楚如何修补缺失的链接。 我认为这是对Ruby的更新,但是RVM在安装ruby的替代版本时也遇到了麻烦。 inheritance人全文: $ sudo gem install jekyll ERROR: Error installing jekyll: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/fast-stemmer-1.0.1 for inspection. Results logged to /Library/Ruby/Gems/1.8/gems/fast-stemmer-1.0.1/ext/gem_make.out 这是否意味着我需要通过rvm更新我使用的ruby版本?

Formtastic和simple_form如何比较?

Formtastic和simple_form如何比较? 各有什么好处?

包括在gem中的耙子任务

1)gem里面的耙子任务有没有“最好”的地方? 我在/ tasks,/ lib / tasks中看过他们,而且我看到他们写成* .rb和* .rake – 不知道哪个(如果有的话)是“正确的” 2)一旦在环境中configuration了gem,我应该如何使它们可用?

我有一个gem安装,但要求“gemname”不起作用。 为什么?

我真正问的问题是为什么要求不采用gem的名称。 另外,在没有的情况下,find秘密咒语要求该死的东西最简单的方法是什么!? 作为一个例子,如果我有memcache-client安装,那么我不得不要求它使用 require 'rubygems' require 'memcache'

gem安装失败,openssl失败

我试图在我的OSX Mountain Lion上安装cocoapods( http://cocoapods.org/ )。 moshe-mbp:~ moshem$ gem install cocoapods ERROR: Could not find a valid gem 'cocoapods' (>= 0), here is why: Unable to download data from https://rubygems.org/ – SSL_connect returned=1 errno=0 state=SSLv3 read server key exchange B: bad ecpoint (https://rubygems.org/latest_specs.4.8.gz) 首先我尝试了 rvm reinstall all –force 然后我尝试了 brew upgrade openssl ==> Upgrading openssl ==> […]