Articles of gem

在本地文件夹中安装gem

我在我使用的共享机器上拥有有限的权限,所以我不能像以前那样安装gem。 例如: $ gem install request-log-analyzer ERROR: While executing gem … (Gem::FilePermissionError) You don't have write permissions into the /usr/lib/ruby/gems/1.8 directory. 是否可以在本地安装gem? (如果重要的话,我试图安装这个gem 。) 我在Stack Overflow上看到很多关于使用Bundler或者gemfiles的文章,但是我没有为Ruby on Rails项目安装这个gem – 我只是想单独使用它。 我正在运行Linux,不知道哪个味道。

错误sudo:gem:command not found

我试图在CentOS上安装rubyrep,并执行sudo gem install rubyrep ,出现错误sudo: gem: command not found 。 Sudo和Gem都是安装和运行的,只是没有组合起来。 我的设置: [rubyrep]# which sudo /usr/bin/sudo [rubyrep]# which gem /usr/local/rvm/rubies/ruby-2.1.2/bin/gem [rubyrep]# which ruby /usr/local/rvm/rubies/ruby-2.1.2/bin/ruby [rubyrep]# $PATH -bash: /usr/local/rvm/gems/ruby-2.1.2/bin:/usr/local/rvm/gems/ruby-2.1.2@global/bin:/usr/local/rvm/rubies/ruby-2.1.2/bin:/usr/local/rvm/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin: No such file or directory

无法在Windows上安装pg gem

我有2个Ruby版本:1.8.7和1.9.2和PostgreSQL 8.3。 我不能在任何安装PGgem。 得到这个错误: C:/Development/Ruby187/bin/ruby.exe extconf.rb checking for pg_config… yes not recorded checking for libpq-fe.h… no Can't find the 'libpq-fe.h header *** 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: […]

如何在安装gem时包含x86-mingw32二进制文件

在Windows 7上,使用ruby 2.1.6:我尝试安装gtk3:gem install gtk3 C:\>gem install gtk3 Fetching: pkg-config-1.1.6.gem (100%) Successfully installed pkg-config-1.1.6 Fetching: cairo-1.14.1-x86-mingw32.gem (100%) Successfully installed cairo-1.14.1-x86-mingw32 Fetching: glib2-2.2.5-x86-mingw32.gem (100%) Successfully installed glib2-2.2.5-x86-mingw32 Fetching: gobject-introspection-2.2.5-x86-mingw32.gem (100%) Successfully installed gobject-introspection-2.2.5-x86-mingw32 Fetching: gio2-2.2.5-x86-mingw32.gem (100%) Successfully installed gio2-2.2.5-x86-mingw32 Fetching: atk-2.2.5-x86-mingw32.gem (100%) Successfully installed atk-2.2.5-x86-mingw32 Fetching: pango-2.2.5-x86-mingw32.gem (100%) Successfully installed pango-2.2.5-x86-mingw32 Fetching: gdk_pixbuf2-2.2.5-x86-mingw32.gem (100%) Successfully installed […]

sqlite3-ruby gem:无法构buildgem原生扩展

更新:看看这个后续问题: 在Windows上的gem更新 – 是否坏了? 在Windows上,当我这样做: gem install sqlite3-ruby 我得到以下错误: Building native extensions. This could take a while… ERROR: Error installing sqlite3-ruby: ERROR: Failed to build gem native extension. c:/ruby/bin/ruby.exe extconf.rb install sqlite3-ruby –platform Win32 checking for fdatasync() in rt.lib… no checking for sqlite3.h… no nmake 'nmake' is not recognized as an internal or external command, […]

在PATH模式040777中获取警告“不安全的世界可写dir / home / chance”,用于rails和gem

我试过这个,但它没有工作,似乎是为OSX。 我有一个新的Ubuntu 10.10与rvm,rails 3和ruby1.9.2安装。 我有一个新的导轨应用程序,但使用gem或导轨导致以下警告(滞后)。 $ rails -v /home/chance/.rvm/gems/ruby-1.9.2-p180@global/gems/railties-3.0.5/lib/rails/script_rails_loader.rb:11: warning: Insecure world writable dir /home/chance in PATH, mode 040777 /home/chance/.rvm/gems/ruby-1.9.2-p180@global/gems/bundler-1.0.10/lib/bundler/runtime.rb:136: warning: Insecure world writable dir /home/chance in PATH, mode 040777 Rails 3.0.5 $ gem -v /home/chance/.rvm/rubies/ruby-1.9.2-p180/bin/gem:4: warning: Insecure world writable dir /home/chance in PATH, mode 040777 1.6.2 只要事情重要,这里是我的Gemfile: source 'http://rubygems.org' gem 'rails' # Bundle edge […]

在Windows上安装bcrypt-ruby gem

我正试图在Windows Vista上安装bcrypt-ruby 。 到目前为止,我已经能够从安装Visual Studio 2008 Express的MS知识库文章和cl.exe安装nmake.exe。 但是,我现在遇到这个错误: cl -nologo -Wall -I. -IC:/InstantRails/ruby/lib/ruby/1.8/i386-mswin32 -I C:/InstantRails/ruby/lib/ruby/1.8/i386-mswin32 -I. -MD -Zi -O2b2xg- -G6 -c -Tcb crypt.c cl : Command line warning D9035 : option 'Og-' has been deprecated and will be removed in a future release cl : Command line warning D9002 : ignoring unknown option '-G6' bcrypt.c […]

在Windows上可能与libgit2的坚固的gem安装问题

我正在使用Windows和我的Gemfile有这样的一行: gem 'rugged' 当我运行bundle install它给我这个错误: Installing rugged 0.21.0 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. C:/Ruby21/bin/ruby.exe extconf.rb –use-system-libraries checking for cmake… no ERROR: CMake is required to build Rugged. *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log […]

错误:安装jekyll时出错:错误:无法构buildgem本机扩展

我的系统有: ruby2.0.0p451(2014-02-24)[x64-mingw32] gem -version 2.2.2 devKit:DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe 当我尝试运行gem install jekyll ,出现这个错误: D:\devKit>gem install jekyll Temporarily enhancing PATH to include DevKit… Building native extensions. This could take a while… ERROR: Error installing jekyll: ERROR: Failed to build gem native extension. "D:/Program Files (x86)/Ruby200-x64/bin/ruby.exe" extconf.rb D:/Program Files (x86)/Ruby200-x64/bin/ruby.exe: invalid switch in RUBYOPT: -F ( RuntimeError) extconf failed, exit […]

在Windows上在轨道上的ruby的本机扩展概率gem时间

由于我是新手Ruby on Rails的,需要帮助的亲,在第一次的应用程序安装,因为我在我的系统上使用MySQL数据库,我也安装了它的gem,但我得到这个错误,当我做一个新的捆绑安装项目应用程序 当 bundle安装在以下阶段时, 会发生以下错误 : Installing mysql2 (0.2.13) with native extensions C:\ Sites \ proj2> bundle install获取http://rubygems.org/的源代码索引使用rake(0.9.2)使用abstract(1.0.0)使用activesupport(3.0.9)使用构build器(2.1.2)使用i18n(0.5.0)使用activemodel(3.0.9)使用erubis(2.6.6)使用机架(1.2.3)使用机架安装(0.6.14)使用机架testing(0.5.7)使用tzinfo(0.3。 29)使用actionpack(3.0.9)使用mime-types(1.16)使用polyglot(0.3.2)使用树梢(1.4.10)使用邮件(2.2.19)使用actionmailer(3.0.9)使用arel(2.0.10) )使用activerecord(3.0.9)使用activeresource(3.0.9)使用bundler(1.0.15 )使用本机扩展安装mysql2(0.2.13) C:/RailsInstaller/Ruby1.8.7/li b / ruby​​ / site_ruby / 1.8 / rubygems / installer.rb:533:在`build_extensions'中:错误:Fai导致构buildgem原生扩展。 (gem::安装:: ExtensionBuildError) C:/RailsInstaller/Ruby1.8.7/bin/ruby.exe extconf.rb checking for rb_thread_blocking_region()… no checking for main() in -llibmysql… no *** extconf.rb failed *** Could not create […]