rubygems

Is there a way to call ruby1.9 without loading rubygems?

So ruby 1.9 is really nice in that it'll automatically require rubygems, and hence when you call require 'somegem' without first requiring rubygems it'll work, and that's generally awesome. But I have a ton of shell scripts using ruby, and they generally don't rely on rubygems. Shell tools should run instantly, and loading rubygems for ...

JRuby OpenSSL Error

I am having problems configuring JRuby to work properly with OpenSSL. Googling has revealed that this is a pretty common occurence, but none of the solutions I've read have worked for me. Here is my setup: Ubuntu 9.10 jruby 1.5.1 jruby-openssl (0.7) Here is the error: irb(main):001:0> require 'jruby/openssl/gem_only' => true irb(m...

Gem installed rails 2.3.8, but not generate rdoc, how to fix?

I use gem install rails -v=2.3.8 to install rails, and it says rdoc and ri has been generated. But when I gem server, I can't open the rails doc in browser, it says doc_root/rails-2.3.8/rdoc/index.html not found I looked into /usr/local/lib/ruby/gems/1.8/doc/rails-2.3.8/rdoc, found it is empty. How to fix it? How to generate the rdoc ...

Compiled Application with Ruby config files (yml)

I compiled a program from source on mac os x which tells me to use the supplied example config files, but how can I run a specific config file? Readme shows what to edit in the config but not how to load it. More specifically this program (http://github.com/carsonmcdonald/HTTP-Live-Video-Stream-Segmenter-and-Distributor) ...

How to change rubygems platform from x86-mingw32 to x86-mswin32-60 on windows

Hi I am doing some ruby scripting in windows, which involves opening and closing a browser. To that end I needed some special gems to interface to the native windows system calls. But when I tried > gem install sys-proctable , it yielded ERROR: Could not find a valid gem ´sys-proctable´ (>= 0), here is why: Found sys-proc...

working with ruby gems (rgrove's 'sanitize')

I would like to use Sanitize in my ruby app. I'm working with a few friends on this project, so making sure the code works when they git it is important too. Anyways, on the console I did >gem install nokogiri Building native extensions. This could take a while... Successfully installed nokogiri-1.4.2 1 gem installed Installi...

How do I copy files from a gem to the local directory

I'm authoring a gem and would like to copy template files that are packaged in my gem into the local directory that the gem is being called from. ...

Rails3, cucumber problem

Trying to follow this tutorial. Autotest fails with this error message: sg $autotest loading autotest/cucumber_rails_rspec2 Error loading Autotest style autotest/cucumber_rails_rspec2 (no such file to load -- autotest/rails_rspec2). Aborting. Gem list: abstract (1.0.0) actionmailer (3.0.0.beta4) actionpack (3.0.0....

help with ruby on rails

I have installed Ruby. When I start the Mongreal server I get this error message the program cant start because msvcrt-ruby18.dll is missing I even downloaded the file msvcrt-ruby18.dll, but no use I googled it, but cannot solve the problem ...

"uninitialized constant" when running RSpec tests with Rails 2.3.8 and Bundler

I just changed my Rails 2.3.8 project to load gems using Bundler, rather than the default Rails 2.3 loading mechanism. I followed the official instructions and the site runs fine in development. I use RVM for gem management, and have a specific gemset loaded for the application. My RSpec test suite is unable to run, however. I have trie...

Quick Nokogiri/Ruby question

Hello, I have a quick parsing question. I have a file with the following structure <admin> <sampleName>Willow oak leaf</sampleName> <sampleDescription comment="Total genes"> <cvParam cvLabel="Bob" accession="123" name="Oak" /> </sampleDescription> </admin> I'm trying to get out the text "Total genes" after the sampleDes...

how to make "gem install rmagick" work?

I wanted to install rmagick on Win7 but it can't install: Is there any way to make it work? C:\>gem list -r rmagick *** REMOTE GEMS *** rmagick (2.13.1) rmagick4j (0.3.7, 0.3.4 java) C:\>gem install rmagick Building native extensions. This could take a while... ERROR: Error installing rmagick: ERROR: Failed to build gem na...

Cannot start server with "rack-recaptcha" gem

I have followed steps, described in rack-recaptcha readme. I have done all the steps, instead of "You have to require 'rack-recaptcha' in your gemfile." Server is unable to start, because of a following error: Booting Mongrel => Rails 2.3.5 application starting on http://127.0.0.1:3001 /System/Library/Frameworks/Ruby.framework/V...

Word to PDF conversion in Ruby/Rails?

Is there a gem or library to convert word document to pdf files in ruby on rails? ...

What is the modern way to structure a ruby gem?

Has much changed with the release of Bundler? Is there a template that can be used as a base? What are the best practices? ...

rvm conflit with sqlite3

Hi $: /Users/dev/.rvm/gems/ruby-1.9.2-head@rails3/gems/sqlite3-ruby-1.3.1/lib/sqlite3/sqlite3_native.bundle: [BUG] Segmentation fault ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0] Abort trap It's seem that ruby is not the correct version (1.8.7) but : $: ruby - v $: ruby 1.9.2dev (2010-07-15 revision 28653) [x86_64-d...

How do I read the content of an Excel spreadsheet using Ruby?

I am trying to read an Excel spreadsheet file with Ruby, but it is not reading the content of the file. This is my script book = Spreadsheet.open 'myexcel.xls'; sheet1 = book.worksheet 0 sheet1.each do |row| puts row.inspect ; puts row.format 2; puts row[1]; exit; end It is giving me the following: [DEPRECATED] By requiri...

Ruby Gem Management

As a Ruby/Rails dabbler, one of the things that's long bothered me is this constant sense that I've just got gem clutter all over the place. Chalk it up to developer OCD, perhaps, or even my novice status as a Ruby/Rails dev, but not knowing where stuff is used, even if it's used, where it lives in my file system or whether it's part of ...

Manually Retry Job in Delayed_job

Delayed::Job's auto-retry feature is great, but there's a job that I want to manually retry now. Is there a method I can call on the job itself like... Delayed::Job.all[0].perform or run, or something. I tried a few things, and combed the documentation, but couldn't figure out how to execute a manual retry of a job. ...

Error with overwriting Ruby class only manifests itself in production?

I recently ran into an odd error that only occurred in production mode. I was using the paths of glory gem that defines the class Achievement (http://github.com/paulca/paths_of_glory/blob/master/app/models/achievement.rb). In the base class, level is defined: def level(level, options = {}) levels << {:level => level, :quota => optio...