Top "Ruby-on-rails-2" questions

Legacy version of the Ruby on Rails web development framework.

Failing to access environment variables within `database.yml` file

I have the following developement section of my development.yml file: development: adapter: postgresql host: localhost database: testtb username: app_…

ruby-on-rails environment-variables yaml ruby-on-rails-2
Rails 2: Model.find(1) gives ActiveRecord error when id 1 does not exist

I am using Rails 2.3.5 and in that if I give Model.find(1) and if 1 is not in the database, it …

ruby-on-rails ruby-on-rails-2
How do you clear a single entry from a ruby on rails session?

In ruby on rails when doing session[:foo] = nil it leaves an entry named :foo in the session object. How …

session ruby-on-rails-2
application wide global variable

In Rails, where should I define the variable which can be recognized by every layer of Rails stacks. For example, …

ruby-on-rails ruby-on-rails-2
How to set the action with form_for?

I created a new page on an existing controller. I added 2 action methods on the controller: prompt_user and process_…

ruby-on-rails ruby-on-rails-2
ActiveRecord::Base Without Table

This came up a bit ago ( rails model attributes without corresponding column in db ) but it looks like the Rails …

activerecord ruby-on-rails-2
How can I update attributes in after_save without causing a recursion in rails 2.3?

I've got a model which has a video attached with Paperclip. After it saves I use the saved video to …

ruby-on-rails callback save ruby-on-rails-2
Force SSL using ssl_requirement in Rails 2 app

I have a Rails application which need to run under SSL. I tried ssl_requirement but seems I have to …

ruby-on-rails ssl ruby-on-rails-2
Why is my rake call causing an 'undefined method `source_index`' error?

I am trying to run bundle exec rake db:migrate then encountered the following error. bundle exec rake db:migrate …

ruby-on-rails gem rake ruby-1.9 ruby-on-rails-2
`add_frozen_gem_path': undefined method `source_index' for Gem:Module (NoMethodError) OR Gem.source_index is deprecated

I am using rails 2.3.11, ruby-1.9.2-p320. Trying to run script/server but getting this error :- system@admin:~/apps/app_…

ruby-on-rails rubygems deprecated ruby-on-rails-2