Legacy version of the Ruby on Rails web development framework.
Questions tagged [ruby-on-rails-2]
746 questions
0
votes
1 answer
How to have the same behavior than 'params' function?
Controller functions receivent parameters like
{"v1" => { "v2" => "1", "v3" => "" }, "v4" => "true"}
The params function allows to use
x = params[:v1], equivalent to x = params["v1"]
if params[:v4], equivalent to ["true",…

pierallard
- 3,326
- 3
- 21
- 48
0
votes
1 answer
Undefined local variable or method when use before_filter
I am upgrading a project from rails 2.0.2 to 3.2.13. I was using before_filter :build_menu like this
class MyController < ApplicationController
layout 'main'
before_filter :build_menu
...
protected
def build_menu
@menu = []
…

Flambo
- 1
0
votes
3 answers
Ajax is not defined on remote_form_for
I encountred an error on form submission. This form is defined as :
<% remote_form_for @my_object do |f| %>
...
<% end %>
The generated HTML is :
0
votes
1 answer
rails actionmailer error with 'part' method
I'm upgrading rails 2.3.2 app ot rails 3.
Have unknown error with sending email message in MailerFormError.
MailerFormError is my model: class MailerFormError < ActionMailer::Base
At 1st I have error with 'deliver_send' method (undefined method…

bmalets
- 3,207
- 7
- 35
- 64
0
votes
2 answers
undefined method `deliver_sent' for MailerFormError:Class
I'm upgrading rais 2.3.2 project to rails 3
Error:
undefined method `deliver_sent' for MailerFormError:Class
Application Trace | Framework Trace | Full Trace
app/controllers/leads_controller.rb:72:in `block in…

bmalets
- 3,207
- 7
- 35
- 64
0
votes
1 answer
Mix :select with :include in find method (Rails 2)
I have 2 models, User and UserProfile. A user has_one user_profile and a user_profile belongs_to user.
1) Find without select
This query in console works fine, and take only 2 SQL queries.
>> User.find(:all, :limit => 10, :include => [ :user_profile…

pierallard
- 3,326
- 3
- 21
- 48
0
votes
1 answer
rails 3 observe_form
I'm upgrading rails_2 project to rails_3. Have a problem with loading data into view from :(
old environtment: rails 2.3.2, ruby 1.8.7
now : rails 3.2.11, ruby 1.9.3
I have a form_for @lead and observe_form in view
{ :action => :update_price },…

bmalets
- 3,207
- 7
- 35
- 64
0
votes
1 answer
rake aborted! undefined method `name' for "actionmailer":String
I have a problems with launching rails project. My environtment:
rails -v
2.3.2
ruby -v
1.8.7 (2012-10-12 patchlevel 371) [i686-darwin11.4.2]
gem -v
1.8.6
When I try to start rails:
$…

bmalets
- 3,207
- 7
- 35
- 64
0
votes
2 answers
rails 2.3.2 project: Could not find RubyGem uuid (>= 0) (Gem::LoadError)
I have a problems with launching a project on rails 2.3.2
How can I setup my rails-environtment with rvm to normal work?
It's what my terminal…

bmalets
- 3,207
- 7
- 35
- 64
0
votes
1 answer
phusion passenger nginx module not picking up my rails application
Note: passenger standalone working fine with my rails application, since i need to deploy multiple rails application, so i am in need of passenger-install-nginx-module
OS
ubuntu 12.04 LTS 64 bit
Ruby
REE 1.8.7 (installed through brightbox…

Sam
- 685
- 12
- 34
0
votes
1 answer
Stack level too deep (SystemStackError) when I add 'spec_helper'
I'm upgrading an old Rails 2.3 application and finding most of the specs are failing.
I and am working to get them passing.
So far most of the spec files have not included require 'spec_helper' but it needs to be added.
(not sure why it wasn't there…

Evolve
- 8,939
- 12
- 51
- 63
0
votes
1 answer
How to upload a file using Ajax request in rails 2.3
I have a rails 2.3 application.
I am using Ajax request to submit the form content. In my form, I have a provision to upload files.
Issue with the form is, if I added a file to the form and submitted the form content, I am getting an error "Error:…

Subrahmanyam Konduri
- 163
- 1
- 11
0
votes
1 answer
rake gems:install failing in rails 2 app for mystifying reasons
I am trying to get a rails 2.3.12 project running in my local development environment, but I cannot seem to install the needed gems. Here are the ruby/rails versions I am using:
$ rvm list
rvm rubies
...
=> ruby-1.8.7-p371 [ i686 ]
...
$ rails…

HandyAndyShortStack
- 559
- 5
- 8
0
votes
1 answer
NoMethodError (undefined method `tempfile'... in Rails 2.3.1
I have downgraded from Rails 3.2.11 to Rails 2.3.11 and I am having trouble accessing the tempfile when my csv file is being uploaded to the server.
It breaks on the code when I call
tmppath = csv.tempfile.to_path.to_s
And here is the trace in my…

freedom
- 751
- 1
- 10
- 20
0
votes
1 answer
PDF (Prawn) : Generate tables without Prawnto
For some permission restriction, I can't install prawnto gem to my server. I used the method of http://blog.idyllic-software.com/blog/bid/204082/Creating-PDF-using-Prawn-in-Ruby-on-Rails to generate PDF for my object.
But, I used the method…

pierallard
- 3,326
- 3
- 21
- 48