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
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
sudo urpmi eclipse
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:
RAILS_GEM_VERSION = '2.2.2' unless defined? RAILS_GEM_VERSION
in the config/environment.rb file
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:
The link below also includes an example script (example.rb) to see if your version of Ruby is vulnerable:
NZKoz fix
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
Problem
Upgrading from a previous version of Rails to the latest 2.3.2, you get an error:
NameError: uninitialized constant ApplicationController
both in the web browser and in console.
Solution
Since the introduction of Rails 2.3 the application.rb file has been renamed to application_controller.rb.
So in order to solve the problem just rename your file application.rb to application_controller.rb.
Thanks to the post here
Problem
You want to use ActiveScaffold in Rails 2.2, in a model that you have created using the standard Rails scaffolding script.
Solution
script/plugin install git://github.com/activescaffold/active_scaffold.git -r rails-2.2
<%= javascript_include_tag :defaults %> <%= active_scaffold_includes %>
class SomethingsController < ApplicationController active_scaffold :something end
map.resources :somethings, :active_scaffold => true
You should now have an active scaffold for your model.