Tag: rubygems

更新到cocoapods 0.32.1后无法运行sudo pod install,错误“你无法以root身份运行CocoaPods。 (CLAide ::帮助)”

我在更新到最新版本0.32.1后运行sudo pod install命令时发现了一个问题。 早些时候它工作得非常好。 当我尝试使用较旧的cocoapods进行pod安装时,它要求我更新到最新的cocoapods版本,即0.32.1。 在我通过cocoapods gem更新后,我无法在我的Xcode项目中安装sudo pod。 它给了我以下错误。 ± sudo pod install ruby-1.9.3-p0 Password: /Users/username/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/gems/1.9.1/gems/claide-0.5.0/lib/claide/command.rb:328:in `help!’: [!] You cannot run CocoaPods as root. (CLAide::Help) CocoaPods, the Objective-C library package manager. Commands:…. 任何克服这个问题的建议都会非常有帮助。 提前致谢。

如何修复“你的Ruby版本是2.3.0,但你的Gemfile指定2.2.5”服务器启动时

运行服务器时出现此错误,如何解决此问题?

加载RubyGems插件时出错,openssl.bundle(LoadError)

我是ruby的新手。 当我键入任何与gem相关的东西时,会发生以下错误。 为什么会导致它以及如何解决问题? 谢谢! Error loading RubyGems plugin “/Users/chiang/.rvm/gems/ruby-2.0.0-p247@global/gems/rubygems-bundler-1.2.2/lib/rubygems_plugin.rb”: dlopen(/Users/chiang/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/x86_64-darwin12.3.0/openssl.bundle, 9): Library not loaded: /opt/local/lib/libssl.1.0.0.dylib Referenced from: /Users/chiang/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/x86_64-darwin12.3.0/openssl.bundle Reason: image not found – /Users/chiang/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/x86_64-darwin12.3.0/openssl.bundle (LoadError)

如何在Ruby Gem中包装Ruby C扩展?

我在这方面找不到很多文档。 如何打包gem以便在安装gem时编译C扩展? 特别是我想这样做: 在Linux和MacOSX上我想在gem install上编译C扩展 在Windows上我想简单地安装一个预编译的.so 对此的任何帮助,特别是示例源,将非常有用:)

将Ruby库和gem用于Shoes应用程序

我正在写一个小鞋子应用程序,需要我用常规Ruby安装编写的库。 我的库使用’net-ssh’gem和一堆其他Ruby库。 当我使用常规ruby(它有自己的命令行界面)直接运行我的库时,如下所示: ruby my_lib.rb …一切都很好。 但是当我尝试在我的Shoes应用程序中要求它时,我得到一个’没有这样的文件加载 – net / ssh’错误(因为my_lib使用net-ssh)。 我尝试在Shoes应用程序中使用$:include路径变量,如下所示: $:.unshift “C:/ruby/lib/ruby/1.8” $:.unshift “C:/ruby/lib/ruby/site_ruby/1.8” require ‘rubygems’ gem ‘net-ssh’ require ‘my_lib.rb’ ……但没有成功。 我得到’找不到RubyGem net-ssh’。 任何人都有同样的问题? 在Shoes应用程序中使用Ruby库和gem的最佳方法是什么?

使用Bundler从Github安装gem

我正在尝试使用这里的说明来安装带有bundler的预发布版本的gem。 “bundle install”输出将gem列为已安装,但“gem list”无法找到它。 我的Gemfile: source :gemcutter gem ‘sinatra’, ‘1.1.0’, :git => ‘http://github.com/sinatra/sinatra.git’ gem ‘RedCloth’, ‘4.2.3’ 这是我的其余示例代码的要点 。 有没有人让这个场景奏效? 注意:我也在使用RVM(在OS X上)。 bundle show会将gem(和依赖项)列为现有的,但我无法正确解析它们。 谢谢。

使用bundler时,如何在Gemfile中使用gem?

当一般使用带有项目的bundle和Rails时,你只能访问Gemfile中定义的gem。 虽然这是有道理的,但它可能是有限的。 当我想使用团队的其他成员不使用的某个RSpec格式化程序时,我发现它主要限制了它。 除非它在Gemfile中,否则无法访问。 任何方式或我必须将其添加到Gemfile? 更新:我的问题不是Bundler而是Spork。 在没有Spork的情况下运行RSpec时,我没有使用任何格式化程序的问题。 更新#2:看起来使用Bundler仍然是导致问题的原因。 使用Spork和不使用Spork之间的区别在于,在没有Spork的情况下运行RSpec时,它会在加载项目并进入Bundler“sandbox”之前加载格式化程序。 使用Bundler: $ bundle exec irb >> require ‘fivemat’ LoadError: cannot load such file — fivemat from (irb):1:in `require’ from (irb):1 from /Users/arikfr/.rvm/rubies/ruby-1.9.3-p194/bin/irb:16:in `’ 没有Bundler: $ irb >> require ‘fivemat’ => true

无法安装do_mysql gem?

我正在尝试在我的Snow Leopord系统Macbook Pro 13上安装do_mysql,但我不断收到此错误: n216-160:~ myself$ sudo gem1.9 install do_mysql Password: Building native extensions. This could take a while… ERROR: Error installing do_mysql: ERROR: Failed to build gem native extension. /opt/local/bin/ruby1.9 extconf.rb checking for mysql_query() in -lmysqlclient… no *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries […]

没有安装jekyll-paginate或其中一个依赖项

我已经安装了这个jekyll主题 。 但面临一个问题。 如果我做: bundle exec jekyll serve 一切正常( _site文件夹包含必要的文件和服务器正在运行),但如果我使用以下命令: jekyll build -d /var/www/budka/data/www/blog 我收到错误: 依赖性错误:哎呀! 看起来你没有安装jekyll-paginate或其中一个依赖项。 为了使用当前配置的Jekyll,您需要安装此gem。 来自Ruby的完整错误消息是:’无法加载此类文件 – jekyll-paginate’如果遇到麻烦,可以在http://jekyllrb.com/help/找到有用的资源! jekyll 3.1.1 | 错误:jekyll-paginate 我试图解决这个问题,但没有成功。 现在Gemfile文件包含: source ‘http://rubygems.org’ gem ‘github-pages’ gem ‘html-proofer’ gem “jekyll” gem ‘jekyll-paginate’ gem “pygments.rb” 安装了jekyll jekyll-paginate (1.1.0) gem,因为我在gem list commnad中看到它: *** LOCAL GEMS *** actionmailer (4.2.5) actionpack (4.2.5) actionpack-action_caching (1.1.1) […]

通过RVM在Ubuntu,Ruby 1.9.2上安装使用本机扩展的gem时出错

我在尝试安装ffi gem时遇到错误: ~ – 16:54>gem i ffi Building native extensions. This could take a while… ERROR: Error installing ffi: ERROR: Failed to build gem native extension. rake RUBYARCHDIR=/home/mdemare/.rvm/gems/ruby-1.9.2-p136/gems/ffi-1.0.6/lib RUBYLIBDIR=/home/mdemare/.rvm/gems/ruby-1.9.2-p136/gems/ffi-1.0.6/lib /home/mdemare/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems.rb:370:in `bin_path’: can’t find gem rake ([“>= 0”]) with executable rake (Gem::GemNotFoundException) from /home/mdemare/.rvm/gems/ruby-1.9.2-p136/bin/rake:19:in `’ Gem files will remain installed in /home/mdemare/.rvm/gems/ruby-1.9.2-p136/gems/ffi-1.0.6 for inspection. Results logged […]