Legacy version of the Ruby on Rails web development framework.
Questions tagged [ruby-on-rails-2]
746 questions
3
votes
1 answer
How to render raw erb content on rails
I've been trying to render a underscore.js template, that is just like ERB on some haml content.
But as the templates grow I dont want to do more like this
%script{:type => "text/template", :id => "my_template"}
:plain
<%= my_js_value…

AndreDurao
- 5,600
- 7
- 41
- 61
3
votes
0 answers
Ruby on Rails RMagick write method saves empty/blank 1x1 image
In my Rails app I can upload images and the meta data is saved in the database table and the file written to disk fine (uploading handled by attachment_fu).
This works fine and I can display a user's avatar, however, I am using a jQuery plugin on…

martincarlin87
- 10,848
- 24
- 98
- 145
3
votes
4 answers
Unable to export more than 5000 rows in rails
I did an app to export all my policies in a excel file but is not exporting all my information
Here is the query in mysql
select * from policies where deleted = 0 AND (state = 0 OR state= 1) ORDER BY state ASC
i got 11,408 total when i executed it…

Carlos Morales
- 1,137
- 3
- 15
- 38
3
votes
3 answers
`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_name/trunk$ script/server
=> Booting WEBrick
=> Rails 2.3.11 application starting on…

Nishutosh Sharma
- 1,926
- 2
- 24
- 39
3
votes
1 answer
Yield Rails 2 vs Rails 3
I was in process of migrating a rails 2 app to rails 3. While doing this i came accross a wiered behaviour with yield.
I have a code snippet where i get the return value of yield.
x= true if yield 'xyz'
So if content_for exists for 'xyz' the value…

Amarnath Krishnan
- 1,253
- 1
- 9
- 12
3
votes
1 answer
rbenv install is failing (telling me to install GCC, but it's already installed)
So, my client has me working on a legacy app which is running Rails 2.3.8 and Ruby 1.8.7, so I'm attempting to install the proper version of ruby using rbenv but it keeps giving me this error:
→ rbenv install 1.8.7-p249
ERROR: This package must be…

jarodtaylor
- 471
- 4
- 11
3
votes
0 answers
Capybara element not found just on Travis
I'm trying to put the free software where I'm one of the collaborators to run the acceptance tests on Travis. Everything went very well except for the acceptance tests with selenium.
And this is a difficult issue because the software uses only the…

manzo
- 51
- 3
3
votes
5 answers
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 --trace
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
undefined method…

yuji
- 31
- 1
- 1
- 2
3
votes
2 answers
rails 2.x Psych::SyntaxError in SessionsController#new
I've got to fix a bug on an old Rails 2.3.8 project and I'm running in to trouble loading the development environment.
I've converted the project to use bundler, here is my Gemfile:
source :gemcutter
gem "rails", "2.3.8"
gem "pg"
gem 'rdoc'
gem…

map7
- 5,096
- 6
- 65
- 128
3
votes
1 answer
How to run rails 2.2.2 application with ruby 1.9.2
I have an existing rails application in Rails 2.2.2 version using Ruby 1.8.6 (MRI).
Can anyone please let me know that, how to run the application using Ruby 1.9.2. As, it is mandatory for me to run the application on Ruby 1.9.2 (MRI)…

Ratnakar Nyros
- 31
- 4
3
votes
1 answer
Heroku Push Rejected for Rails 2.3.5
I am trying to push my app up to Heroku, but am getting rejected. Here is the error message I'm getting.
Counting objects: 63, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (56/56), done.
Writing objects: 100% (63/63),…

user1750732
- 31
- 1
3
votes
1 answer
Integrate premailer gem with Rails 2.X application
I have a rails 2.3 application and would like to integrate the premailer gem to it.
I found how can you do it for a rails 3.X application:
How to Integrate 'premailer' with Rails
Anyone knows how to do it for action mailer 2.3.10?

iwiznia
- 1,669
- 14
- 21
3
votes
1 answer
can't uninstall rake 0.9 on rails 2.3.8
I'm working on a legacy Rails 2.3.8 project and setting up a dev server.
I get errors when I try to run rake, and I realized I have the wrong version of Rake installed, in the Rakefile it says:
s.add_dependency 'rake', '>= 0.7.1'
and I have…

schatzkin
- 319
- 3
- 17
2
votes
1 answer
Raw output from controller action method
I want to output some text without using a template. Right now I have a controller action method that's altering the Content-Type of the response and I want to display the text directly, without creating a template file (a single-line template file…
user9903
2
votes
1 answer
using lambda with default scope
I'm facing lil problem using lambda with default_scope in rails 2.3.
default_scope lambda { {:account_id => account_id } }
I used above code but error message is displayed ArgumentError: wrong number of arguments (1 for 0)
Am I using lambda worng…

ashisrai_
- 6,438
- 2
- 26
- 42