gem

Setting up Mysql for Ruby on Rails in Windows

I'm on Windows, and I have a working Rails 2.3.8 app on Ruby 1.8.6 with MySQL 5.0 and the mysql gem version 2.8.1. It all works. I just installed Ruby 1.9.1, installed gems for rails(2.3.8) and mysql. BUT NOW when I run ruby script/server: !!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and...

Failed to build iconv gem on ruby 1.9.2

Hello, I fail to install the 'iconv' gem, because of weird build errors. I have build the 'libiconv' from source and linked the .h and .dylib into the rvm's include and lib directory. When I run gem install iconv Gem outputs strange build errors: Building native extensions. This could take a while... ERROR: Error installing iconv:...

Problem installing gem pauldix-feedzirra on windows

I am trying to install pauldix-feedzirra gem on windows xp and getting error like this : Building native extensions. This could take a while... ERROR: Error installing pauldix-feedzirra: ERROR: Failed to build gem native extension. C:/InstantRails-2.0-win/ruby/bin/ruby.exe extconf.rb checking for curl-config... no checking f...

How to remove Ruby Gems which have failed to install properly

Is there a prescribed way to "clean up" Ruby Gems which have native extensions that have failed to build. There are directories/files left in the gems directory, however gem list --local does not list them as being installed. e.g. sqlite3-ruby, linecache, mongo ...

What is the difference between where 'require' looks and where 'Gem.available?' looks for gems?

I'm a bit confused about how paths work with gems. Here's the core of my confusion: >> require 'rubygems' => false >> Gem.available?('money') => true >> require 'money' LoadError: no such file to load -- money from (irb):3:in `require' from (irb):3 from /usr/bin/irb:12:in `<main>' >> Gem.available?('pony') => fa...

i18n assets management / translation UI

Hello everyone, i'm building a multi-lingual webapp with i18n from the ground up, and while i myself can deal with an army of yml files, the languages i speak are ( very ) limited, and would eventually like to ask for outside help. I'd like to know if anyone here is using a UI plugin/gem ( not unlike django-rosetta on django ) to deal ...

How do you precompile the native extensions for a ruby gem for linux?

We have a ruby application that depends on a gem with native extensions (in this specific case Nokogiri). However, for various reasons we cannot install the build prerequisites (such as build-essential, libxslt-dev, ruby-dev, etc) for that gem onto our production host. Is there a (standard?) way to repackage the gem with the native exte...

Rails3 mysql2 rake error

hi, i'm running ruby 1.8.7 with rails3. after installing mysql2 (successful) I want to create the dbs, but the following error occurs: noname:addressDB clemens$ rake db:create (in /.../addressDB) rake aborted! undefined method `errno' for #<Mysql2::Error:0x1024f21f0> (See full trace by running task with --trace) noname:addressDB cleme...

How can I configure gem to only ever use system gems?

I want to configure gem to only use system gems - never those in $HOME/.gem. This is because I'm writing a script that will access Gem.path and I don't want it to return the path to gems in my home directory. I'm pretty sure I haven't explicitly set GEM_HOME or anything like that in my .bashrc, .bash_login etc. But Gem.path returns my ...

Install Mogli Gem on Rails 3

I am trying to install the mogli gem( http://github.com/mmangino/mogli ) on rails 3 and am running into problems with the configuration. I have NO prior experience with Rails 2. For Rails 2 Add config.gem "mogli" to environment.rb For Rails 3, I added the following to the gemfile. gem 'mogli' For Rails 2, routes map.resource :...

Rails new GEM_HOME

I recently upgraded to Ruby 1.8.7 (had an issue with 1.9.2) and had to reinstall RubyGems. Now my project can't see any of the old gems in my GEM_HOME, is there a way to point my new gem binary to my previous GEM_HOME? I can't find anything online and it's a big pain to install them all again one by one. I'm also on a Mac, so it's at:...

Prevent gem A from overriding methods of unrelated gem B

For some time, xml-simple gem had been working for me just fine (indirectly, through another gem). But lately I had to install Amazon S3 gem also. Amazon guys had decided that xml-simple wasn't cool enough, so they supplied a replacement: 'faster-xml-simple'. And they also decided that everybody wants to use their code now, so they did ...

How to build my own rack preview like sinatra - staticmatic

Hi Guys I have HAML SASS converter and want to allow users the localhost:30000 functionality i guess to view their HAML SASS files in the browsers. Any guides you know that might help me? Thanks ...

Rails 3 compatible image uploading with no dependencies?

OK so I'm looking for a good image uploading gem that is Rails 3 compatible and has no dependencies. I was using attachment_fu, but it's Rails 3 compatibility seems to be in question. And I really wanted to use Paperclip, but it has an image majick dependency. I'm having a hard time finding other alternatives... Stupid question #1:...

I deleted a rails gem in the wrong way - what should I do?

So I installed rspec 2.0 beta 22 and then I deleted the folder in the library folder on my mac (I know i'm an idiot). Now I can't reinstall or uninstall. HELP!! Thanks ...

How to use a gem in Rails 3 without referencing it in the Gemfile.

I'm wondering how to make a gem accessible in a Rails 3 app without putting a reference to it in the gemfile. I want to do this with ruby-debug (I'm using ruby-debug19). I use this to debug, but not everybody on my team does and forcing the dependency just so I can use it doesn't seem very diplomatic. Is there another way? If it ends up...

avoid http checking when installing a home made gem

Hi, I'm working on a set of gems for my application. When installing any of my own gems, the gem program will check rubugems specs (possibly for dependencies). With a verbose flag I can see messages like : GET http://rubygems.org/latest_specs.4.8.gz 302 Found GET http://production.s3.rubygems.org/latest_specs.4.8.gz 200 OK GET http...

Rails Script Segmentation Fault with RVM

I am getting a segmentation fault. Should which ruby return /usr/local/bin? rpi-wl-757:ellisberner maletor$ rails generate mailer ContactMailer /Users/maletor/.rvm/gems/ruby-1.9.2-p0/gems/mysql2-0.2.4/lib/mysql2/mysql2.bundle: [BUG] **Segmentation fault** ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0] Abort trap...

rvm, irb and require - not working for installed gems under irb

Hi, I have just installed rvm today and it looks really handy/powerful. I think I am getting the hang of it, but... When using an rvm installed ruby, and running irb, when I require an installed gem, something, like 'rvm', I get: > kimptoc$ rvm use 1.8.7 Using /Users/kimptoc/.rvm/gems/ruby-1.8.7-p302 > kimptoc$ gem list *** LOCAL ...

How can I set flag CLIENT_MULTI_STATEMENTS for mysql2 ruby gem?

Or another way to run multiple queries in one function call in mysql2 gem? ...