rubygems

How to fix "dlopen(/Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/mysql.bundle, 9): Library not loaded: /usr/local/mysql/lib/mysql/libmysqlclient.15.dylib"?

I've upgraded to Rails 2.2.2 and installed the MySQL 2.7 gem and am seeing this error when I try to run a migration or start the server: dlopen(/Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/mysql.bundle, 9): Library not loaded: /usr/local/mysql/lib/mysql/libmysqlclient.15.dylib Referenced from: /Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/mysq...

How do you downgrade rubygems?

I have rubygems 1.3.1 installed but I want to go back to 1.2.0. What's the command to downgrade rubygems? ...

JRuby/Windows and (native) extensions how do I distinguish them?

I've tried to use EventMachine etc., with JRuby. I get errors about native extensions. I believe this is due to Java limitations. I think the fact that I am on Windows further complicates the issue. Some clarification would be appreciated. What extensions can/can't be used with JRuby? How can I tell? Thanks. ...

Calling a method on initial state with AASM

Is it possible to invoke a method when the initial state is entered when using the AASM Gem? I'd like the spam_check method to get called when a comment is submitted, but it doesn't seem to work. class Comment < ActiveRecord::Base include AASM aasm_column :state aasm_initial_state :submitted aasm_state :submitted, :enter => :sp...

What does error occurred while evaluating nil.dependencies mean?

I'm running ruby on rails v2.2.2 and when I run rake gems I get this error. $ rake gems --trace - [I] settingslogic rake aborted! You have a nil object when you didn't expect it! The error occured while evaluating nil.dependencies /vendor/rails/railities/lib/rails/gem_dependency.rb:77:in `dependencies' ...

I get "Missing these required gems", but gems are installed

Hi, since I updated ruby using Mac Ports (on Leopard) I have got several problems and I also had to reinstall gems. Now when I run Mongrel I keep getting the error "Missing these required gems" followed by the list of gems that I required in environment.rb but that gems seems to be correctly installed as I see running gem list. I think t...

Missing htons while building dnssd gem for Ruby 1.9.1

I've been trying to get the latest version of the DNSSD plugin to work with Ruby 1.9.1 but ran into a few problems. I've outlined the steps I have taken so far, maybe someone here will be able to figure out what else is going wrong. Tried installing the current version, using: sudo gem19 install dnssd Gem install failed citing htons co...

How can I force gem to upgrade to gem 1.3.1

I am trying to install a gem like this: C:\InstantRails\rails_apps\foodmarksthespot>ruby script/plugin install git://github.com/lazyatom/engines.git Which returns this message: Rails requires RubyGems >= 1.3.1 (you have 1.2.0). Please `gem update --system` and try again. But when I try to update using: gem update --system it say...

How to compile RDiscount on Solaris?

Hi, I have a few Solaris 10 boxes and I'd like to have RDiscount running there. (They are Joyent accelerators, which have a somewhat customized, BSD-ish, userland, in case it matters.) I'm aware of Maruku, rpeg-markdown and other ruby alternatives to BlueCloth, but initially I'd like to go with RDiscount. Here's what I get when trying...

Using Ruby Enterprise Edition, gems are not installed where I would expect

I have just installed Ruby Enterprise Edition and am installing some gems for it. Stock Ruby 1.8.6 is also installed on the server. I have added /opt/ruby-enterprise-1.8.6-20090201/bin to my PATH a head of /usr/bin where ruby and gem live. which gem confirms this: /opt/ruby-enterprise-1.8.6-20090201/bin/gem However, when I install g...

Vanishing Ruby Gems

I'm using Ubuntu 8.10 and I installed Ruby and Ruby on Rails following the directions on this site. The exact directions I followed are no longer there as it appears the rubyonrails.org wiki has changed recently. But I installed it the long way. Installed Ruby, then Gems, then installed Rails using "gem install rails". I haven't really m...

Locomotive slowing to a crawl

I have recently been building very small and simple apps using Locomotive 2.0.8. Until now it has been the ideal solution, but recently the application has slowed to absolute crawl. It takes literally 10 minutes to boot up, 5 minutes to add an existing or new project - and often these creations don't even work correctly. I can't imagine ...

Using Warbler, how do I exclude Active Record from the bundled gems?

When using Warbler, what line(s) do I need to add to config/warble.rb to keep it from including Active Record in the bundled gems. I already have excluded Active Record in config/environment.rb as shown below. config.frameworks -= [ :active_record ] I tried the same thing only using config.gems in config/warble.rb, but to no avail. ...

How do I install a RubyGem from NetBeans that I created?

Is it possible to install a RubyGem that I created in NetBeans, through NetBeans without uploading it to RubyForge? ...

rake gems:refresh_specs error on unpacked gems

Following the great advice of Chris Wanstrath, I decided to vendor everything. However, whenever I run a rake task now I get an error for each of my unpacked gems stating config.gem: Unpacked gem gemname in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this. I've done this but no dice. Anyone have the...

Where can I find a collection Of Ruby Gems?

Where can I find a collection of free available Ruby gems? Why reinvent the wheel if a gem is already available that you can re-use? ...

Nokogiri: Putting a group of <p> inside a <div>

I'd like to figure out a way on how to get to the HTML result (mentioned further below) by using the following Ruby code and the Nokogiri Rubygem: require 'rubygems' require 'nokogiri' value = Nokogiri::HTML.parse(<<-HTML_END) "<html> <body> <p id='1'>A</p> <p id='2'>B</p> <h1>Bla</h1> <p id='3'>C</p> ...

RSpec Gem does not seem to install dependencies...

$> jruby -v jruby 1.1.4 (ruby 1.8.6 patchlevel 114) (2008-08-28 rev 7570) [x86-java] $> gem install rspec JRuby limited openss loaded. gem install jruby-openssl for full support. http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL Succesfully installed rspec-1.1.12 1 gem installed Installing ri documentation for rspec-1.1.12... Installin...

Error installing Rails 2.3 RC2

I'm trying to install rails using the following command: $ sudo gem install rails --source http://gems.rubyonrails.org But this is what i'm getting: WARNING: RubyGems 1.2+ index not found for: http://gems.rubyonrails.org/ RubyGems will revert to legacy indexes degrading performance. ERROR: While executing gem ... (Gem::Pac...

Is there a way to update RubyGems offline?

I am trying to install Ruby + WATIR to a Windows server which is in an isolated environment. Typically I would run the ruby installer followed by these two commands: 1) gem update --system 2) gem install watir This is as per the instuctions here The server I am now trying to install to does not have internet connectivity. This caus...