Problem
Your host (ie dreamhost) for deploying applications doesn’t have the gems you are using in your development.

Solution
After freezing your rails gems with rake rails:freeze:gems, freeze the rest of your gems, not with rake gems:freeze gem=GEM_NAME, as used in previous versions of rails, but with:

rake gems:unpack

Problem
There was a warning about an XSS vulnerability in Ruby on Rails. More details can be found here.

Solution
Upgrade to the most recent (fixed) Rails version (2.3.4):

sudo gem install rails

Problem
Trying to deploy in dreamhost with capistrano you get the error:

RubyGem version error: rack(0.3.0 not ~> 1.0.0)

Solution
Log in with ssh to your dreamhost account and then install the newer version of rack that is not yet installed in dreamhost:

gem install rack

That assumes that you have followed the instructions for setting up your local gems in dreamhost (here) and you already have a ~/username/.gems directory.

You may probably need to also add the following to your config/environment.rb :

ENV['GEM_PATH'] = ‘/home/USERNAME/.gems’

Note 09-Sep-2009
It seems that according to the dreamhost wiki we need to add the following to the config/environment.rb, instead of the line above:

if ENV['RAILS_ENV'] == ‘production’
ENV['GEM_PATH'] = ‘/home/USERNAME/.gems’
require ‘/home/USERNAME/.gems/gems/rack-1.0.0/lib/rack.rb’
end

to use the locally installed rack-1.0.0 gem, instead of the rack installed by dreamhost.

Problem
You want to do a new installation of Aptana RadRails IDE in Mandriva as an eclipse plugin.

Solution

  • Install eclipse first (selecting openjdk when prompted):
    sudo urpmi eclipse
  • According to the instructions here take the following steps:
  • From the Help menu in Eclipse, select Software Updates
  • Select the Available Sotware tab
  • Click the “Add Site..” button.
  • Specify the Location Url update site: http://update.aptana.com/update/studio/3.4/ and click OK
  • Select the checkbox next to the added update site.
  • Click the install button.
  • Complete instruction to install from update site and restart eclipse
  • Go to ‘My Aptana’ page and then the ‘Plugins’ tab on the top
  • Click on Aptana Rad Rails ‘Get It’ link and get through the next sequence of screens select ‘ok’.
  • Restart Eclipse and RadRails should now be installed.

Problem
When using a nested (or embedded) scaffold in ActiveScaffold with Rails 2.3.2 you have the error:

undefined method `render_component'

Solution
According to the issue here, in Rails 2.3 the render_component has been removed.

Install the render_component from:

script/plugin install git://github.com/lackac/render_component.git -r rails-edge

and restart your server, and it should be working.

Problem
While developing on Rails 2.3.2 you want to deploy in dreamhost that uses 2.2.2 at the moment.

Solution
Although we could try to freeze the specific rails version we are using, it’s probably easier as a temporary solution, until dreamhost upgrades the rails version to do the following:

  • Make sure that we have the following line with the appropriate version of
  • RAILS_GEM_VERSION = '2.2.2' unless defined? RAILS_GEM_VERSION

    in the config/environment.rb file

  • Rename the application_controller.rb file back to application.rb
  • Comment out the following line from config/environments/production.rb
  • config.action_view.cache_template_loading = true

Problem
There is a DoS vulnerability in Ruby, and consequently in Ruby on Rails, reported by Jose Fernandez

Solution
For anyone that haven’t so far looked into it there are some links to resolve the problem:

Ruby site

The link below also includes an example script (example.rb) to see if your version of Ruby is vulnerable:
NZKoz fix

Problem
After upgrading to Mandriva 2009.1 Spring, that uses KDE 4, you can no longer lock the screen as you get the error:

no appropriate greeter plugin...

Solution
There is a package missing from the upgrade so do:

urpmi kdm

Problem
You are trying to install spree from the git source, following the instructions from here, but there are errors like:

gem install activemerchant --version "= 1.4.1"
ERROR:  While generating documentation for builder-2.1.2
... MESSAGE:   Unhandled special: Special: type=17, text=""
... RDOC args: --ri --op /usr/lib/ruby/gems/1.8/doc/builder-2.1.2/ri --title Builder
    -- Easy XML Building --main README --line-numbers
    --quiet lib CHANGES Rakefile README doc/releases/builder-1.2.4.rdoc
    doc/releases/builder-2.0.0.rdoc doc/releases/builder-2.1.1.

Solution
Make sure you have the following gems installed:

sudo gem install builder haml echoe

and then run:

sudo rake gems:install

Problem
You are trying to install the mysql gem in Mandriva, but it fails with error messages:

ERROR:  Error installing mysql:
ERROR: Failed to build gem native extension...
checking for mysql_query() in -lmysclient... no ....

Solution
After searching in google, with solutions about providing different options (– –with-mysql-config, ..etc), even trying different combinations for providing the client library path, the configuration file, or the header file path, was still faced with the same error installing the mysql gem.
As the Mandriva installation was quite new, it turns out to be a couple of missing packages.
So try:

urpmi gcc
urpmi make

and run:

gem install mysql

again.

It should work out ok install the gem and output:

Building native extensions. This could take a while...
Successfully installed mysql-2.7
1 gem installed

« Previous PageNext Page »