gem

Build a Plugin or Gem?

Typically I create a plugin when I have a module that I know I'm going to need over again in my other projects, however, they could also be packaged as gems. When should I be building a gem over creating a plugin? Is there any criteria for making the call? ...

How to embed a gem into a RubyCocoa app?

I'd like to embed 2 gems into my RubyCocoa app, so the user doesn't have to install them on the console on him-/herself. But I can't find any information on about how to do that. ...

Overriding a module method from a gem in Rails.

I've got a gem (will_paginate) that's broken on my version of Oracle. The default paginate_by_sql method in the WillPaginate module is inserting an extra 'AS' into a query and causing it to fail. The code itself is easily fixed, but i'm not sure of the best way to get rails to pick up my change. I don't want to change the code in the ...

How to use haml with heroku ?

Hello I try to get haml working without the gem with sinatra (Heroku doesn't allow gem install, as far as I know) What I've done so far: clone the haml git repo inside my project add : require 'haml/lib/haml.rb' to my sinatra main file the following works: get '/test' do Haml::Engine.new('%p test').render end but the following...

Template error

Hi, my Rails app works fine locally. But once I put it on a server and in production mode, I get this error: ActionView::TemplateError (undefined method `each' for nil:NilClass) on line #7 of app/views/admin/confirm.rhtml: 4: <br>Description: 5: <br><%= @description %> 6: <br>Features: 7: <% @features.each do |feature| %> 8: <br><%...

Shoes and Gems

I have shoes raisins (0.r1134) [i686-darwin8.9.1] +video I'm trying to set up a Shoes.setup block like this: Shoes.setup do gem 'mini_exiftool' gem 'xml-simple > 1.0' require "mini_exiftool" require 'xmlrpc/client' require 'xmlsimple.rb' require "my_webservice_api_wrapper" mwa = MyWebserviceApiWrapper.new mwa.login ...

Problems installing mechanize gem on Mac OS X 10.4.11

Hi all, I'm trying to install mechanize gem on a MAC OS X but I keep getting the following error : ERROR: Error installing mechanize: ERROR: Failed to build gem native extension. /usr/local/bin/ruby extconf.rb install mechanize checking for #include ... yes checking for #include ... yes checking for #include ... yes checki...

Looking for ruby gem that determines programming language by reading the code?

A couple of months ago I read a blog post about a ruby gem that could determine the programming language by reading the code itself. For the life of me I can't recall the blog or the name of the gem. And googling for "ruby programming language guess" and variations thereof aren't helping. Anyone happen to know the name of the gem in q...

When i try sudo gem install json I get the following error

I need to install the JSON gem to start my app but I get the error below whenever I try to install the json gem. Can anyone help me out. Im using rails 2.2.2 and gems 1.3.1; thx for any help you can provide. Arions-macbook-pro:.ssh arion$ sudo gem install json Password: Sorry, try again. Password: Building native extensions. This cou...

Ubuntu noob rails install fails on zlib

Hey all, hope you guys can help; I've followed about every tutorial on the net with no luck. I've just moved over to Ubuntu 8.10 as my dev box; it's my first serious foray into Linux as a daily-use OS, and I'm having a hard time getting Rails going. I have followed a number of tutorials which all seem to work fine, but when I try and u...

Is there a gem/plugin that will populate a database with test data?

Hello, is there a gem or plugin that will populate a database with test data? ...

Do you have to do duplicate gem installs for JRuby & MRI?

I have JRuby and Ruby (MRI) installed. It seems that I need to install gems twice - once for each of these platforms. Is this necessary or am I doing it wrong? After I installed the rails gem for MRI, should I have pointed JRuby to it, or was it necessary for me to also call: "jruby -S gem install rails" ...

Your favorite lesser-known Rails gems/plugins

What are your favorite lesser-known gems/plugins for Rails? This question about Rails plugins brought up only the usual suspects (Paperclip, RSpec, Shoulda, Restful Auth, etc). It'd be great to get a list going about the hidden, less popular ones that rock. ...

What are your favourite Rubygems?

Possible Duplicate: What are the "Must Have" Ruby Gems There are a load of great Rubygems out there that do some amazing things. In fact, I sometimes wonder what I'd do without Rubygems - they certainly give a load of appeal to Ruby and Rails. What are you favorites, and what would you recommend to install? ...

How do I convince Rubygems (1.3.3) that I really do want it to install dependencies?

For any gem that has dependencies, I get the following (with the names changed as applicable): Attempt 1: sudo gem install mojombo-jekyll -s http://gems.github.com/ ERROR: Error installing mojombo-jekyll: mojombo-jekyll requires RedCloth (= 4.1.0, runtime) Attempt 2: sudo gem install mojombo-jekyll -s http://gems.github.com...

Rubygems-style utility for .NET?

Is there anything like Ruby gems for .NET? ...

Ruby Gem Calendar Date Select

Hey, I'm having trouble with the time portion of the Calendar Date Select gem. The following code limits the date to any day after/greater than today. I need to do this for time, limiting the user to a time that is 24 hours or greater than from now. I can't figure out if the code used in the :valid_date_check is SQL, or Javascript or wha...

Ruby gem LoadError - rubygems/defaults/operating_system

Hello, I've installed ruby 1.8.6 p368 and gems 1.3.4 as well as required libraries like zlib, ssl or readline on my winxp sp3 box. The problem is, when I now try to use some gem, I get the following error: Exception `LoadError' at D:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:1112 - no su ch file to load -- rubygems/defaults/operating_syst...

Check for Ruby Gem availability

Is there a way to check if some gem is currently installed, via the Gem module? From ruby code, not by executing 'gem list'... To clarify - I don't want to load the library. I just want to check if it's available, so all the 'rescue LoadError' solutions don't help me. Also I don't care if the gem itself will work or not, only whether it...

Essential Ruby gems?

We're starting to standardise on a Ruby-based testing framework, having had some very good results out of RSpec and Cucumber-based testing recently. As this is a large enterprise, we're going to attempt to put together a "standard" set of Ruby gems for testing, knowing we're only ever going to get it ~90% right because of the broad mix ...