gem

Ruby MYSQL2 gem installation on windows 7

这一生的挚爱 提交于 2019-12-17 03:24:34
问题 I'm trying to installing the mysql2 gem on windows 7 I downloaded the connector from the mysql site and placed the libmysql.dll in ruby200\bin then do gem install mysql2 These are the results am I being dim here? Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... ERROR: Error installing mysql2: ERROR: Failed to build gem native extension. C:/Ruby200/bin/ruby.exe extconf.rb checking for rb_thread_blocking_region()... yes checking for rb_wait

Installing PG gem on OS X - failure to build native extension

↘锁芯ラ 提交于 2019-12-17 02:18:53
问题 It seems many others have had problems installing the pg gem. None of the solutions posed for others have worked for me. I have tried to install the pg gem and postgres.app. The pg gem won't install. The first error I get is: An error occurred while installing pg (0.17.0), and Bundler cannot continue. Make sure that gem install pg -v '0.17.0' succeeds before bundling. The installation advice about pointing my gem install to the config for pg fails with the following error message (which many

How to use pry-byebug in an example script for a gem?

自作多情 提交于 2019-12-14 04:18:22
问题 I'm working on making my first gem, which is not a Rails app, is a tic-tac-toe library with some AI in it, so I can play a computer opponent that will never lose and force a win if possible. Right now I am trying to debug the attack strategy in the AI, but I can't seem to figure out how to get pry-byebug working in my test script, specfically, have the debugging commands like step , next , etc. work upon hitting a binding.pry . The gem, named smart-tac-toe, has the following directory

Pry is not a module

痴心易碎 提交于 2019-12-14 03:28:07
问题 Ok, as @tim-moore asked, I will post it in new question. Ok, so I wanted to make gem using bundle. Pry extension gem require that gem start with pry- as mentioned here. I used: bundle gem pry-name but it messed up my file structure create pry-name/pry-name.gemspec create pry-name/lib/pry/name.rb create pry-name/lib/pry/name/version.rb As you can see it created lib/pry directory. I know it's gem's style to created such structure but now I pry cannot load this gem automatically One solution

Ruby cannot find required libraries even though gem is installed

时光总嘲笑我的痴心妄想 提交于 2019-12-14 01:00:33
问题 I have spent literally days trying to install ruby 1.9.2 and get it working with gems :-/ I eventually gave up on my Mac OSX 10.6 machine and below is the current state on my Ubuntu machine. Any advice would be greatly appreciated! # ruby test.rb <internal:lib/rubygems/custom_require>:29:in `require': no such file to load -- mongo (LoadError) from <internal:lib/rubygems/custom_require>:29:in `require' from test.rb:1:in `<main>' # cat test.rb require 'mongo' db = Mongo::Connection.new.db("mydb

consuming gems from jruby-complete

牧云@^-^@ 提交于 2019-12-14 00:58:27
问题 I can make my jruby-complete consume gems from a jar passed to it. But I'd like to use a central gem repo. This is what I can do now: $ java -jar jruby-complete-1.6.5.jar -S gem list *** LOCAL GEMS *** rake (0.8.7) sources (0.0.1) $ java -jar jruby-complete-1.6.5.jar -rjar_of_gems.jar -S gem list *** LOCAL GEMS *** erubis (2.7.0) mizuno (0.4.1) rack (1.4.0) rack-protection (1.2.0) rake (0.8.7) rna (0.0.101) sinatra (1.3.2) sources (0.0.1) tilt (1.3.3) Having to change the jar file everytime I

How to install Nokogiri Ruby gem with mkmf.log saying libiconv not found?

我们两清 提交于 2019-12-14 00:15:56
问题 I'm installing the Ruby Nokogiri gem and finding the error below. How to diagnose this and solve it? # gem install nokogiri Building native extensions. This could take a while... ERROR: Error installing nokogiri: ERROR: Failed to build gem native extension. ... /opt/ruby/1.9.3-p194/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

Installing libbzip2 on Windows

青春壹個敷衍的年華 提交于 2019-12-13 21:08:47
问题 I am trying to install libbzip2 on Windows 7. (Actually I want to install wp2txt package, but it seems need to libbzip2). I installed "Bzip2 for Windows" as suggested by Alex. But I get following errors. C:\Users\John>gem install bzip2-ruby -- --with-bz2-include="C:\Program Files (x86)\GnuWin32\include" -- --with-bz2-lib="C:\Program Files (x86)\GnuWin32\lib" Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... ERROR: Error installing bzip2

如何将--no-ri --no-rdoc设置为gem install的默认设置?

Deadly 提交于 2019-12-13 14:34:32
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 我不使用我在机器上或我处理的服务器上安装的gem的RI或RDoc输出(我使用其他文档编制方式)。 默认情况下,我安装的每个gem都会安装RI和RDoc文档,因为我忘记设置 --no-ri --no-rdoc 。 有没有办法将这两个标志设置为默认值? #1楼 在Linux(可能是Mac)上: echo 'gem: --no-document' >> ~/.gemrc 这条线曾经在这里发表评论,但不知何故消失了。 #2楼 您可以使用 .gemrc 配置文件指定默认选项。 有关gem配置文件的文档 #3楼 您只需 ~/.gemrc 添加到本地 ~/.gemrc 文件中(位于 主 文件夹中) gem: --no-document 或者您可以将此行添加到全局gemrc配置文件中。 这是找到它的方法(在Linux中) strace gem source 2>&1 | grep gemrc #4楼 请注意,根据新 指南 已弃用了 --no-ri 和 --no-rdoc 。 推荐的方法是在 ~/.gemrc 或 /etc/gemrc 使用 --no-document 。 install: --no-document update: --no-document 要么 gem: --no-document #5楼 Windows

Installing Dashing Error

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-13 14:27:14
问题 I am trying to install Dashing Framework on my Macbook Air Os X Mavericks running Ruby 2.0.0. When I run sudo gem install dashing I get the following errors: ERROR: Error installing dashing: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/include/ruby.h Gem files will remain installed in /Library/Ruby/Gems/2