ruby-on-rails-gems

How to convert a gem to plugin in ruby on rails and vice versa?

Is there any tool to convert plugin to gem and vice versa. ...

Help installing delayed_job

I'm trying to use collectiveidea's delayed_job gem The installation instructions include Rake tasks are not automatically loaded from gems, so you’ll need to add the following to your Rakefile: begin require 'delayed/tasks' rescue LoadError STDERR.puts "Run `rake gems:install` to install delayed_job" end Where is my Rakefile? And...

Ruby on Rails simple_navigation Gem

I'm using the simple_navigation gem with RoR 2.3.5 It all seems to work correctly, I followed the info in the RDoc (seen here http://rdoc.info/projects/mexpolk/simple_navigation) However, when I actually render out the simple_navigation menu on my main application.html.erb file it escapes all of the html in it (multiple escapes actual...

what is the best to use - ruby gems or ruby plugins

Hi All, What is the best practice when creating a rails project 1 - is it good to use ruby gems 2 - or is it good to use ruby plugins (as almost all the gems has their plugin versions) and what are the strengths and weaknesses of eachoption consider we are creating the rails project with rails 2.x.x or rails 3 thanks in advance ...

What does it mean when "rake gems" returns gems with no state?

Here is the command line output: [email protected] [~/rails_apps/recurse]# rake gems (in /home/breefiel/rails_apps/recurse) - [ ] authlogic - [ ] acts_as_archive - [ ] haml I = Installed F = Frozen R = Framework (loaded before rails starts) Notice that the gems are not I, F, or R...what does this mean? This is just one ind...

installed gems activated before frozen gems?

We're using gems:unpack to ensure gem version consistency across environments. However, we're running into: can't activate , already activated [GEM-VERSION] Is this because installed gems take precedence over frozen ones? Is it possible to have frozen gems activate first? Advice on ways to keep gems consistent welcome. ...

Liquid view_paths error

I'm trying to deploy my RoR app. It seems to be working fine on my development machine when RAILS_ENV is set to development. However, when I put it on the production server and set it into production mode I get the following error after navigating to the start page: => Booting Mongrel => Rails 2.3.8 application starting on http://0.0....

Why am I getting a file exists -c: error

I am trying to use paperclip to upload a csv file to my rails application so I can parse it into the database, but whenever I select the file and try to upload it, the controller returns the error File exists - c: when it tries to save the instance. When I inspect the object in debugger mode I get this: #<Import id: nil, datatype: "use...

Rails config.gem error on gem installed

I already have installed this gem: googlecharts.rubyforge.org, but I don't want to require it every time I need it on my actions, so I am trying to do it the Rails way: config.gem 'mattetti-googlecharts' Then I go and start my server and get this error: Missing these required gems: mattetti-googlecharts You're running: ...

File does not exist, while using roo in Ruby-on-rails

I am developing a small Ruby-on-rails application. I am using 'roo' gem to open an excel file. But rails throws an IO error while attempting to open the file. It says file does not exist. It works fine in irb. My development machine is windows. Here is my code file ="#{RAILS_ROOT}/public/data/import.xls" file.gsub!("\\","/") workbook =...

Formtastic internationalization of select-tags

Could you tell me how to add internationalization for select tags in formtastic? # view .... f.input :hair_colour, :as => :select, :collection => HAIR_COLOURS .... # user.rb class User << AR validates_inclusion_of :hair_colour, :in => [0..8] end # de.yml de: profile: hair_colour: 0: "Blond" 1: "Dunkelblond" ...

Rails::Railtie: Trouble creating a Rails 3 gem

I could really use another set of eyes on this so I thought I would post it here. A while ago I wrote a basic ActiveRecord Extension for my own educational purposes. I've been reading about Railties lately and thought I would try to get it working with Rails 3. I thought I would package it up as a gem to get a sense of that process as we...

Authlogic problem in production mode: undefined local variable or method `acts_as_authentic' for class name

Hello Everyone, I'm using the AuthLogic gem in my rails app. It works fine in the development environment but when I switch to production environment, I get an error preventing the app from starting: /home/.../rails/xxx/app/models/book.rb:2: undefined local variable or method `acts_as_authentic' for Book:Class (NameError) from ...

rails user-ip from within the model?

I'm wondering if there's a more direct way to get and record a users IP in the model itself. I've been doing it from the controller but I noticed using the rakismet gem it mentions doing everything from within the model, but not the IP specifically. http://github.com/joshfrench/rakismet Currently I'm doing this, just before I save fro...

Error installing mysql2: Failed to build gem native extension.

Windowsxp. Ruby192. Rails installed. Mysql installed. When I try to run gem install mysql2 (or bundle install) I get errors: C:\ruby\cred2>gem install mysql2 Building native extensions. This could take a while... ERROR: Error installing mysql2: ERROR: Failed to build gem native extension. C:/Ruby192/bin/ruby.exe extconf.rb ch...

`rescue in load_missing_constant': uninitialized constant Sass::Script (NameError)

Hi, I am trying to run Shapado (A rails based Stackoverflow clone). While running the script I get the following error - `rescue in load_missing_constant': uninitialized constant Sass::Script (NameError) I have haml installed - Haml/Sass 3.1.79 (Bleeding Edge) I do not understand how to get around this error. Can you give some pointer...