gem

Gem path used by rake different than system path on OS X

> gem env gempath /Users/davec/.gem/ruby/1.8:/opt/local/lib/ruby/gems/1.8 > head Rakefile require 'rubygems' puts Gem.path require 'rake/clean' require 'rake/testtask' require 'rcov' require 'rcov/rcovtask' > rake /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8 /Library/Ruby/Gems/1.8 rake aborted! no such f...

Best way to install mulitple gems onto a computer?

Is there an easy way, when running a Ruby script, to get it to automatically install gems required for script? For example, consider these require statements at the top of a ruby script: require 'net/http' require 'fileutils' require 'archive/zip' Now, I know (as a human and programmer) that for this script to run on a given PC with ...

error while installing ruby gem

I am trying to install a ruby gem. I am getting this error. C:\>gem install racc Building native extensions. This could take a while... ERROR: Error installing racc: ERROR: Failed to build gem native extension. c:/ruby/bin/ruby.exe extconf.rb install racc extconf.rb:3:in ``': No such file or directory - uname -p (Errno::ENOEN...

What are the pitfalls and solutions when setting up Rails/Mysql on Leopard?

Hi there, I've been going stir crazy trying to install the ruby mysql gem here, and I'm writing here so if anyone else is in this ridiculous situation, they don't have to go through the same pain as me. What are the common gotchas when installing the mysql gem onto a fresh copy of Leopard? In this case, I'm using Leopard - OS 10.5....

Is it possible to update model attributes using Ohm and Redis DB is Ruby?

I'm taking a first look at Monk and the Ohm/Redis APIs and I have a simple question. Is it possible to update attributes on model objects using Ohm/Redis? class Event < Ohm::Model attribute :name index :name end Event.create(:name => "A mistake made here...") @event = Event.find(:id, 25) @event.name = "I want to edit my mistake.....

How to replace the Unicode gem on Ruby 1.9?

Unfortunately, the Unicode 0.1 (sudo gem install unicode) doesn't work on Ruby 1.9. I have the following snippet: require "rubygems" require "unicode" str = "áéíóúç" Unicode.normalize_KD(str).gsub(/[^\x00-\x7F]/n, "") #=> aeiouc I use it to convert titles to permalink, without removing accented characters. Is there a way of converti...

MySQL Ruby Gem on OS X Snow Leopard

I've been fighting with getting the MySQL Ruby Gem up and running on Snow Leopard for the past couple of days. I have tried all different sorts of things to get this working, and currently have MySQL 5.1.37 x64 installed. After fighting to even get the Gem installed I believe that I finally got it installed, but whenever I attempt to ac...

Having problems with net::ssh::multi can't require it! Ruby

So I've tried to install net::ssh::multi on mac using gems: gems install net-ssh-multi The installation went fine, however when I type: require 'net/ssh/multi' it says load error. I have no idea whats wrong with what I'm doing! ...

Gem update fails, no Xcode

I ran sudo gem update earlier today and was thrilled to see it work, but at the end it failed. Building native extensions. This could take a while... ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError) ERROR: Failed to build gem native extension. ruby extconf.rb update can't find header files for ruby. I don't ha...

Is it possible to download a Ruby gem without installing it automatically?

When I download something using gem I'd like to be able to just download the gem, and then choose whether or not I want to install it. I'm asking this because I'd like to install a particular gem on more than one computers ( without installing from the internet on each one ). ...

256 color terminal library for Ruby?

Is there a gem like 'Term::ANSIColor' which works with 256 color terminals? The perl script 256colors2.pl works great in my terminal, and I'd like to use some of these colors in my ruby scripts without manually inserting the ANSI codes. ...

How to distribute a Ruby application with the required gems

I've developed a Ruby application (a small game), and I would like to 'distribute' it to other people. However, I am not sure what to do about the required gems. If I just send my application to someone who have ruby installed, but not the required gems, I assume it will blow up. Can I package the gems locally? If so, would it conflict...

Is Rails-2.3 stable? Does anyone have any problems with it?

Hello, I want to develop an application in Ruby on Rails. I have used rails(vigorously) a couple of years ago. since then i haven't given it a try, i have been concentrating on core ruby. At that time, Rails(1.2.x) used to be a bit slow! so my problem is whether i should go for the earlier slower version or should i try newer versions......

OAauth gem in rails problem.

I'm trying out OAuth for twitter api authentication and ran into a brick wall when my code spits out the message: (instance of OAuth::Consumer needs to have method `marshal_load') My code: @consumer=OAuth::Consumer.new( "token","secret", { :site=>"http://mysite.com/" }) @[email protected]_request_token session[:reque...

require library returns 'missing file' message

I have a small application which I created using jeweler. The jeweler generates a lib/ directory, where I suppose to write my code. This gem I'm creating depends on the httparty gem, so, in my Rakefile I put Jeweler::Tasks.new do |gem| gem.add_dependency('httparty', '>= 0.4.5') ... end in my implementation file I put r...

How to specify rubygems path in environment-less Ruby script?

I've written a data collection script for Cacti in Ruby and it runs fine from the command line but Cacti runs the script via "env -i" which strips the environment so Ruby can't find the rubygems library ("in `require': no such file to load -- rubygems (LoadError)"). How might I work around this? ...

ruby on rails 1.2.6 and ActiveMerchant

I am trying to run ActiveMerchant gem with old version of Rails (1.2.6). And if I require active_merchant gem i get this error: config/boot.rb:17:Warning: Gem::SourceIndex#search support for String patterns is deprecated, use #find_name /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:280:in `activate': can't activate activesupport (>= 2....

Forking a gem for a Rails project

I've found myself twice in this situation: I install a gem on my system and start using it from my Rails project. Eventually I need to make some changes to that gem. How should I proceed? Ideally I'd like to check out the source code of that gem somewhere, like ~/third_party/gems, work on it and have my Rails project use that instead. I...

Best YouTube gem for Ruby?

Is there a definitive gem for the YouTube API? I'm trying to use youtube_g, but it seems to break on some basic stuff. ...

Where should you install gems to with Rubygems for development?

Hi everyone If you don't install gems with sudo on a mac, by default they will be placed in a directory like .gem/ruby/1.8/gems/ If you DO install by with sudo, my understanding is they are normally placed in the system directories, like so: /usr/local/lib/ruby/gems/1.8/gems/ Is there a good reason you should install gems with ...