{"id":7221,"date":"2014-05-30T03:28:39","date_gmt":"2014-05-30T03:28:39","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/05\/30\/rubyrubygemsrelated-issues-collection-of-common-programming-errors\/"},"modified":"2014-05-30T03:28:39","modified_gmt":"2014-05-30T03:28:39","slug":"rubyrubygemsrelated-issues-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/05\/30\/rubyrubygemsrelated-issues-collection-of-common-programming-errors\/","title":{"rendered":"ruby,rubygemsRelated issues-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/0d14c880b894f353c476c3df8e798f51?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nGreg W<br \/>\nruby-on-rails ruby applescript daemon osascript<br \/>\nI have a need to frequently run an applescript on my web server. As the server is running rails, and I need access to my models before and after running the script, I thought that a daemon (via the daemons gem) might be appropriate.In theory this is fairly easy. Below is a simplified example. #!\/usr\/bin\/env rubyENV[&#8220;RAILS_ENV&#8221;] ||= &#8220;development&#8221;require File.dirname(__FILE__) + &#8220;\/..\/..\/config\/application&#8221; Rails.application.require_environment!$running = true Signal.trap(&#8220;TERM&#8221;) do $running = f<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/6a0ef4178507d535d52892534da53c10?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nGagan<br \/>\nruby opencv<br \/>\nI am unable to install ruby-opencv gem.Here&#8217;s what I have done so far.Installed openCV withsudo apt-get install libopencv-devThen tried installing ruby-opencv gem withgem install ruby-opencvBut I got the following error? test gem install ruby-opencv Building native extensions. This could take a while&#8230; ERROR: Error installing ruby-opencv:ERROR: Failed to build gem native extension.\/home\/ckgagan\/.rvm\/rubies\/ruby-1.9.3-p484\/bin\/ruby extconf.rb &gt;&gt; Check the required libraries&#8230; checking<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/71321de399d47802a3bc1636d4addc64?s=32&amp;d=identicon&amp;r=PG&amp;f=1\" \/><br \/>\nyudi2312<br \/>\nruby gem db2<br \/>\nI am getting below error on installing ibm_db gem. Got no idea what is causing this. I am using ruby on Win 7 32-bit and i am using ibm_data_server_driver_package_win32_v10.5 downloaded from IBM website.D:\\Users\\zzuj001&gt;gem install ibm_db &#8212; &#8216;&#8211;with-IBM_DB-include=&#8221;C:\\Program Files\\ IBM\\IBM DATA SERVER DRIVER\\include&#8221; &#8211;with-IBM_DB-lib=&#8221;C:\\Program Files\\IBM\\IBM DATA SERVER DRIVER\\lib&#8221;&#8216; ERROR: Error installing ibm_db:ERROR: Failed to build gem native extension.C:\/Ruby200\/bin\/ruby.exe extconf.<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/7a1ec53845532ff7ab726ea809cffa74?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nSayuj<br \/>\nruby gem bundle<br \/>\nI am getting an error while bundle install$ vi Gemfilesource &#8216;http:\/\/rubygems.org&#8217;gem &#8216;daemons&#8217; gem &#8216;rfeedparser&#8217;$ ruby -vruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]$ bundle install &#8211;path vendorFetching source index for http:\/\/rubygems.org\/ Using addressable (2.2.6) Using cgi_multipart_eof_fix (2.5.0) Installing character-encodings (0.4.1) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.\/usr\/bin\/ruby1.8 extconf.rb checking fo<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/932d3fbb93a7cc8bc8ee1bd74de8929a?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nSean<br \/>\nruby-on-rails ruby rubygems jekyll rdiscount<br \/>\nI am attempting to get Jekyll and bower working within Windows 8I have managed to install Ruby, and the DevKit, I tried, version 2.0.2, 1.9.3 and then again with the Rails installer from http:\/\/railsinstaller.org\/I have followed both scenario A and B at the following, https:\/\/github.com\/oneclick\/rubyinstaller\/wiki\/Troubleshooting#wiki-gems_fails_comspec_autorun but neither are relevant to me, COMSPEC is my cmd.exe location and I don&#8217;t have an autorun?I can run gem install mysql but attempting t<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/3b1a3c7eb11abd99439c5b1b4b50b37f?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nmadth3<br \/>\nruby ubuntu-12.04 lapack blas gsl<br \/>\nI have Ubuntu Precise and can&#8217;t find in the software repo any lapack or blas. When I run sudo gem install gslI get an error output. I have gsl 1.15. The output is as follows Building native extensions. This could take a while&#8230; ERROR: Error installing gsl:ERROR: Failed to build gem native extension.\/usr\/bin\/ruby1.8 extconf.rb checking gsl version&#8230; 1.15 checking gsl cflags&#8230; -I\/usr\/include checking for main() in -lcblas&#8230; no checking gsl libs&#8230; -L\/usr\/lib -lgsl -lgslcblas -lm checking fo<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/yamcx.jpg?s=32&amp;g=1\" \/><br \/>\ntokhi<br \/>\nruby-on-rails ruby gem bundle ruby-rice<br \/>\nI&#8217;m trying to install rice gem via ruby 1.9.3 in ubuntu 12.4 but I get:An error occurred while installing rice (1.4.2), and Bundler cannot continue. Make sure that `gem install rice -v &#8216;1.4.2&#8217;` succeeds before bundling.I tried to install libs below but it didn&#8217;t worke for me:sudo apt-get install libmapnik libmapnik-dev mapnik-utils python-mapnikthis is the complete exception that I get:Gem::Ext::BuildError: ERROR: Failed to build gem native extension.\/home\/vagrant\/.rvm\/rubies\/ruby-2.1.0\/bin\/ruby<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e69047ae973e706d455d641b4b381ad4?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\ndagarre<br \/>\nruby-on-rails ruby rubygems bundler therubyracer<br \/>\nRunning bundle update in terminal inside of my project folder and an error occurs and Bundler can&#8217;t continue. How can I resolve this and run a successful bundle update?Mac osxTerminal output:master*$ bundle update Fetching source index from http:\/\/code.thesite.com\/ Fetching gem metadata from https:\/\/rubygems.org\/&#8230;&#8230;&#8230;. Fetching gem metadata from https:\/\/rubygems.org\/&#8230;&#8230;.. Resolving dependencies&#8230; Using rake (10.1.0) Using i18n (0.6.5) Using minitest (4.7.5) Using multi_json (1.8.2) U<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/graph.facebook.com\/100005517126993\/picture?type=large\" \/><br \/>\nLife of Madness<br \/>\nruby gem centos gitlab centos5<br \/>\nI get this gitlab install error.Does anyone know why?log:[git@ictiy-01 gitlab]$ sudo -u git -H bundle install &#8211;deployment &#8211;without development test postgres aws Fetching source index from https:\/\/rubygems.org\/ Using rake (10.1.0) Using i18n (0.6.9) Using minitest (4.7.5) Using multi_json (1.8.2) Using atomic (1.1.14) Using thread_safe (0.1.3) Using tzinfo (0.3.38) Using activesupport (4.0.2) Using builder (3.1.4) Using erubis (2.7.0) Using rack (1.5.2) Using rack-test (0.6.2) Using actionpack<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/1f7f6bd37c819ca2e3482155282661e2?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nJim Lim<br \/>\nruby postgresql rubygems<br \/>\nThis is just another thread about the same question. How to install gem pg. I tried almost all the other threads I have found on stackoverflow and it doesn&#8217;t work.I tried installing postgress via brew, and via dmg package. And the outcome is the same error.Xcode Verion: 4.6 Rails Version: 4.0.0 Ruby Version: ruby-2.0.0-p247:$ gcc &#8211;version i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00) Copyright (C) 2007 Free Software Foundation, Inc. This i<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/932d3fbb93a7cc8bc8ee1bd74de8929a?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nSean<br \/>\nruby-on-rails ruby rubygems jekyll rdiscount<br \/>\nI am attempting to get Jekyll and bower working within Windows 8I have managed to install Ruby, and the DevKit, I tried, version 2.0.2, 1.9.3 and then again with the Rails installer from http:\/\/railsinstaller.org\/I have followed both scenario A and B at the following, https:\/\/github.com\/oneclick\/rubyinstaller\/wiki\/Troubleshooting#wiki-gems_fails_comspec_autorun but neither are relevant to me, COMSPEC is my cmd.exe location and I don&#8217;t have an autorun?I can run gem install mysql but attempting t<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e69047ae973e706d455d641b4b381ad4?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\ndagarre<br \/>\nruby-on-rails ruby rubygems bundler therubyracer<br \/>\nRunning bundle update in terminal inside of my project folder and an error occurs and Bundler can&#8217;t continue. How can I resolve this and run a successful bundle update?Mac osxTerminal output:master*$ bundle update Fetching source index from http:\/\/code.thesite.com\/ Fetching gem metadata from https:\/\/rubygems.org\/&#8230;&#8230;&#8230;. Fetching gem metadata from https:\/\/rubygems.org\/&#8230;&#8230;.. Resolving dependencies&#8230; Using rake (10.1.0) Using i18n (0.6.5) Using minitest (4.7.5) Using multi_json (1.8.2) U<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/1f7f6bd37c819ca2e3482155282661e2?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nJim Lim<br \/>\nruby postgresql rubygems<br \/>\nThis is just another thread about the same question. How to install gem pg. I tried almost all the other threads I have found on stackoverflow and it doesn&#8217;t work.I tried installing postgress via brew, and via dmg package. And the outcome is the same error.Xcode Verion: 4.6 Rails Version: 4.0.0 Ruby Version: ruby-2.0.0-p247:$ gcc &#8211;version i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00) Copyright (C) 2007 Free Software Foundation, Inc. This i<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/71770d043c0f7e3c7bc5f74190015c26?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nthe Tin Man<br \/>\nrubygems bundle bigdecimal gemfile<br \/>\nI&#8217;m using Bundle to install gems in d:\/cucumbertests\/cucumber\/ successfully, which installs BigDecimal v 1.1.0. This failed in d:\/cucumbertests\/cucumber\/itinfix which installed BigDecimal v 1.2.0.How do I identify the correct version of BigDecimal in my Gemfile in d:\/cucumbertests\/cucumber\/itinfix? Why is the version of BigDecimal correct in d:\/cucumbertests\/cucumber? The latest version is 1.2.0, found by running gem query &#8211;remote &#8211;name-matches bigdecimal is:REMOTE GEMS:bigdecimal (1.2.0) bigd<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/26d7b31da814155de274bc19f5c5f82f?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nMike<br \/>\nmysql ruby rubygems gem osx-mavericks<br \/>\nTrying to install mysql2 on 10.9 is a nightmare. Any help would be greatly appreciated.Running Ruby 2.0.0 p247. Xcode, command line tools and mysql client are installed.Heres the terminal output:gem install mysql2 -v 0.3.13Building native extensions. This could take a while&#8230; ERROR: Error installing mysql2:ERROR: Failed to build gem native extension.\/Users\/mike.simmonds\/.rvm\/rubies\/ruby-2.0.0-p247\/bin\/ruby extconf.rb checking for rb_thread_blocking_region()&#8230; yes checking for rb_wait_for_sin<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/263aa1ae12d9757f78167b80e596c3df?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nChloe<br \/>\nruby rubygems gem imagemagick rmagick<br \/>\nHow do I install rmagick gem for Windows XP? I already installed ImageMagick with the header files, and I installed RailsInstaller.org which comes with DevKit. I don&#8217;t know where to look to fix these errors.C:\\RailsInstaller\\ImageMagick-6.8.2-Q16&gt;ruby -v ruby 1.9.3p125 (2012-02-16) [i386-mingw32]C:\\RailsInstaller\\ImageMagick-6.8.2-Q16&gt;gem -v 1.8.16C:\\RailsInstaller\\ImageMagick-6.8.2-Q16&gt;path=%PATH%;C:\\RailsInstaller\\ImageMagick-6.8.2-Q16C:\\RailsInstaller\\ImageMagick-6.8.2-Q16&gt;identif<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/zvBka.jpg?s=32&amp;g=1\" \/><br \/>\nBushido Code<br \/>\nruby-on-rails rubygems bundle-install ruby-install<br \/>\nI apologize ahead of time if I don&#8217;t do a good job of explaining this. I am a complete beginner and I have been struggling to find anything online that is written with that in mind. So far, my only experience is doing the Javascript and Ruby sections of Codecademy.com. I read that I should have some knowledge of Ruby before trying out Rails. So I found this site Getting Started with Rails and I tried to follow the steps and do exactly as it said. It even says at the beginning, &#8220;This guide is des<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/71770d043c0f7e3c7bc5f74190015c26?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nthe Tin Man<br \/>\nmysql ruby rubygems mysql2<br \/>\nI am currently trying to install the mysql2 gem for a Ruby on Rails application. I am using Ruby 1.9.2. Here is the error:todd-andrewss-macbook:shiftly toddOld$ gem install mysql2 Building native extensions. This could take a while&#8230; ERROR: Error installing mysql2:ERROR: Failed to build gem native extension.\/Users\/toddOld\/.rvm\/rubies\/ruby-1.9.2-p0\/bin\/ruby extconf.rb checking for rb_thread_blocking_region()&#8230; yes checking for mysql.h&#8230; yes checking for errmsg.h&#8230; yes checking for mysqld_er<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/7f8710cd5754a79df5dc5cd3d5308da2?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nMrRoth<br \/>\nruby rubygems chef vagrant berkshelf<br \/>\nenclosed a snippet of my console:release version:$ sudo cat \/etc\/*release* | grep -i distrib DISTRIB_ID=Ubuntu DISTRIB_RELEASE=13.10 DISTRIB_CODENAME=saucy DISTRIB_DESCRIPTION=&#8221;Ubuntu 13.10&#8243;ruby version:$ ruby &#8211;version ruby 2.0.0p299 (2013-08-29) [x86_64-linux-gnu]vagrant version:$ vagrant &#8211;version Vagrant 1.3.5prerequisites:$ sudo dpkg -s libxml2 libxml2-dev libxslt1-dev libxslt1.1 build-essential | grep -i status Status: install ok installed Status: install ok installed Status: install ok in<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/5143ad2cc64aafc2fa2dc43111831f81?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nSimpleton<br \/>\nruby ruby-on-rails-3 rubygems rvm<br \/>\nI&#8217;ve just upgraded my app from 1.8.7 to 1.9.2 using RVM and had to add RubyGems and Bundler, ran bundle install and got everything to work except SystemTimer. Google-fu returns nothing and I see others have had issue with it in 1.9 but some have gotten it to work. Any ideas?pawel:bodb pawel$ sudo gem install SystemTimer Building native extensions. This could take a while&#8230; \/Users\/pawel\/.rvm\/rubies\/ruby-1.9.2-p290\/lib\/ruby\/site_ruby\/1.9.1\/rubygems\/ext\/builder.rb:48: warning: Insecure world writ<\/li>\n<\/ul>\n<p>Web site is in building<\/p>\n<p>I discovery a place to host code\u3001demo\u3001 blog and websites.<br \/>\nSite access is fast but not money<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.m5zn.com\/newuploads\/2014\/01\/30\/jpg\/e7da807964b1fff.jpg\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Greg W ruby-on-rails ruby applescript daemon osascript I have a need to frequently run an applescript on my web server. As the server is running rails, and I need access to my models before and after running the script, I thought that a daemon (via the daemons gem) might be appropriate.In theory this is fairly [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7221","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7221","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=7221"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7221\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=7221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=7221"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=7221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}