gem

What gem can I use to generate a HTML file for offline use?

I have to create a report, and in order to do some colouring and tables, I decided on HTML. Is there any gem I could use to do this? I'd like to avoid having to write the tags myself. ...

How do I make Rails pick up gems from local source directories?

I'm creating a few gems by extracting out parts of a Rails project that can be reused (and that I have duplicated in other Rails projects). The problem I have is that testing every change to the gems is now very slow. Changing a Rails project is very fast as most of the time the change is re-loaded automatically, but changing a gem impl...

How do I make my generator discoverable by Rails?

When I'm creating a gem, how do I make the generator discoverable by Rails? I have a generators directory with my generator inside. I symlinked it from ~/.rails/generators and it worked fine, but when I install the gem, even though the generators directory is installed, Rails doesn't find it. ...

Capistrano Hates Gemspecs

I'm deploying a rails app on Slicehost using Capistrano. Part of the process of deployment involves rebuilding a gem and installing it. Deploying the code to the server via git scm works fine, but for some reason when I try and do a... run 'gem build /my/app/folder/my.gemspec' ... in a separate task in deploy.rb, it all goes bboom. I...

Deploying Sinatra app on Dreamhost/Passenger with custom gems

I've got a Sinatra app that I'm trying to run on Dreamhost that makes use of pony to send email. In order to get the application up and running at the very beginning (before adding pony), I had to gem unpack rack and gem unpack sinatra into the vendor/ directory, so this was my config.ru: require 'vendor/rack/lib/rack' require 'vendor/s...

Is it possible to download a platfrom specific Ruby gem without installing it?

I read a answer the gem fetch answer on this question is-it-possible-to-download-a-ruby-gem-without-installing-it-automatically. But windows I do not always get the windows gem. Using gem install gosu --remote installs the windows version Successfully installed gosu-0.7.15-x86-mswin32-60. When downloading using gem fetch gosu I get Dow...

Using Rails googlecharts gem on HTTPS/SSL site

I am using the googlecharts gem in my rails app for some simple charting. It works beautifully, except my app is required to be SSL encrypted at all times. In order to pull the google charts, the charts gem of course makes an http request to google which leads to a browser warning about some insecure content on the page for most users. H...

gem cmd from a ruby script

hi I want to check with "gem outdated" if there are any gem updates. Is it possible to get the result of the gem software in a script as string or value? I don't want to execute system() oder something similar. thanks for your help ...

Packaging precompiled binaries inside of a gem

I've got a ruby web app that uses lilypond to generate sheet music based on user input. I'd like to move the hosting to heroku (I've recently used heroku on a few projects and really liked it, plus my traffic is low enough that it'd be free host it on heroku, for a while at least). However, heroku's dyno architecture doesn't allow you ...

including rake tasks in gems

1) Is there a 'best' place for rake tasks inside of gems? I've seen them in /tasks, /lib/tasks, and I've seen them written as *.rb and *.rake -- not sure which (if any) is 'correct' 2) How do I make them available to the app once the gem is configured in the environment? ...

gem is very slow

hi On my server searching is fast but on my local machine gem searches are slow. Can I do something for speed up my gem searches? ...

gem being loaded by script/console initialization, but not server initialization

I'm moving a rails app from my desktop to a shared host, and I'm running into trouble with a gem dependency. I have this declared in my environment.rb: config.gem "icalendar" When I first tried starting a console for the app, I got error messages requesting that I rake:install the gem. I used the shared hosting gem install process t...

Local Install of capistrano

This question is specific to capistrano, but it's a general gem question too. I have to download and then install gems - no remote connection available. I went to github and downloaded capistrano as tarball. I get the file thoughtbot-capistrano-d1229b2.tar.gz To install do I now... - rename the tarball with a .gem extension and run ...

ARCHFLAGS not taking command (MySQL 64-bit ruby gem installation issues on Snow Leopard)

Hello all, I've never used the ARCHFLAGS command before and am in way over my head. I'm struggling with getting the MySQL gem working on Snow Leopard in 64 bit. What I'm doing is this command: sudo env ARCHFLAGS='-arch x86_64' gem install --verbose --no-rdoc --no-ri mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config The...

Problem installing mysql gem on Snow Leopard: uninitialized constant MysqlCompat::MysqlRes

Hi All I've got a problem trying to install the Ruby mysql gem driver. I recently upgraded to Snow Leopard and did the Hivelogic manual install of MySQL. This all seems to work fine as I can access mysql from the command line and make changes to the database. My problem is that if I now use rake db:migrate I get: rake aborted! uni...

Installed Rails but the rails command says it's not installed.

Hey there, I'm using Ubuntu 9.10 Karmic Koala and Ruby 1.9.1. I installed Rails using sudo gem install rails, which installed all the libraries for me. When I type rails in the terminal it says. The program 'rails' is currently not installed. You can install it by typing: sudo apt-get install rails rails: command not found I can fi...

Using installed gems in Ruby with 'require'

I do something like sudo gem install json. Then I do irb. Then I do require 'json'. Then it says no such file to load -- json ...

How to install rdiscount ruby gem in windows vista ?

I have vista and trying to install ruby gem - 'rdiscount' and get following error..what's the answer for this? $ gem install rdiscount Building native extensions. This could take a while... ERROR: Error installing rdiscount: ERROR: Failed to build gem native extension. c:/Ruby/bin/ruby.exe extconf.rb checking for random()... ...

digest/hmac is part of ruby standard lib

Hi, i'm working with some codes that has a: begin require 'digest/hmac' USE_EMBEDDED_HMAC = false rescue puts "HMAC, not found in standard lib." + $!.message require 'hmac-sha1' USE_EMBEDDED_HMAC = true end As i could see, at least in rails 1.8.6 its not part of the standard lib. Is it part from the ruby 1.9 lib? If not, should i in...

Won't Let Me Install Gem in Ruby Prompt

Windows Vista, Ruby v. 3.3.5 C:\>gem install rmagick Building native extensions. This could take a while... ERROR: Error installing rmagick: ERROR: Failed to build gem native extension. C:/Ruby19/bin/ruby.exe extconf.rb checking for Ruby version >= 1.8.5... yes Invalid drive specification. Unable to get ImageMagick version ...