Questions tagged [ruby-on-rails-3.2]

Ruby on Rails version 3.2.0 released at January 20, 2012. Use this tag for issues related to development in Ruby on Rails version 3.2.0.

Ruby on Rails version 3.2.0 is a specific version of Ruby on Rails. Released on January 20th, 2012. It has been succeeded by version 3.2.15. It brings many improvements to the Ruby on Rails web development framework.

The distinct features include:

  • Faster development mode: only modified classes are reloaded giving a visible performance boost.
  • Automatic Query Explanation: database queries taking longer than 30 seconds to execute are automatically explained while in development mode.

Further reading:

Related tag

6982 questions
2
votes
2 answers

No route matches [DELETE] "/models.id" Error

I keep getting this error and I haven't found an answer here that addresses this error. I have a Book, User and Like model stated like this: class Book < ActiveRecord::Base attr_accessible :title has_many :likes has_many :users, through:…
Shikasan
  • 331
  • 1
  • 6
  • 20
2
votes
1 answer

No route matches {:action=>"show", :controller=>"questions", :id=>nil}

Ruby: 2.0.0p0 , Rails: 3.2.13 my rake routes: questions GET /questions(.:format) questions#index POST /questions(.:format) questions#create new_question GET /questions/new(.:format) …
zjhui
  • 779
  • 1
  • 8
  • 21
2
votes
1 answer

Argument error while deploying rails app via capistrano to bluehost

I have build a sample app using rails and trying to deploy it using capistrano to bluehost. But I am failing to do so. I followed the instructions mentioned in this http://vasil-y.com/2012/08/21/rails-capistrano-git-bluehost/ This is the contents of…
swaroopsm
  • 1,389
  • 4
  • 18
  • 34
2
votes
1 answer

Rails will not start on OS X 10.8.3 with 'too short escaped multibyte character' using Ruby 2.0.0-p0 and Rails 3.2.13

I've installed Ruby using the standard RVM and homebrew setup. I tried installing a new version of readline, then force reinstalling ruby-2.0.0, but that didn't solve this. The only other similar errors I can find by searching are in loofah, but…
jeffday
  • 71
  • 2
2
votes
1 answer

Using crc32 tweak on has_many relations in Thinking Sphinx

It's weird actually. I have two models that have has_many relation each other, here are my models #model city class City < ActiveRecord::Base belong_to :state end #model state class State < ActiveRecord::Base has_many :city end and I have state…
2
votes
1 answer

where to define a rails view table and instead a mysql table is created

I am using RoR3.2 and have a bunch of model objects now. One thing I'd like to do is have a mysql view but I'm not sure where you put it. class CreateQv < ActiveRecord::Migration def up execute <<-SQL drop view qv SQL execute…
timpone
  • 19,235
  • 36
  • 121
  • 211
2
votes
0 answers

Rails Engines - simple possible engine to (1) add a model and (2) add the association in the containing class

I am trying to write my first engine but am having problems with the following scenario. In the host app, I will have User model (this is guaranteed so in the engine I can refer to User class rather than some level of indirection) which has a name.…
timpone
  • 19,235
  • 36
  • 121
  • 211
2
votes
1 answer

Handling audio assets in Rails 3.2 with audio_* helpers

I'm trying to include audio files to the asset pipeline in my Rails 3.2 app and reference them with the help of the audio_* helper methods, but it doesn't work like I think it should work: I have a audio file here: app/assets/audios/onturn.wav I…
2
votes
2 answers

Trouble installing nodejs gem

I'm having some trouble installing the nodejs gem. I believe my situation is similar to the question posted here, so I followed the instructions and added gem 'nodejs' to the gemfile, but I'm getting the error Could not find gem 'nodejs (>= 0) ruby'…
Amateur Math Guy
  • 199
  • 2
  • 3
  • 12
2
votes
1 answer

How do I verify that all my assets are precompiled

I recently ran into this error: ActionView::Template::Error (costa rica.png isn't precompiled): Now I know how to fix this particular issue (and others like it), but it's sort of a pain to have to track them down one at a time. Ideally, there would…
tzenes
  • 1,699
  • 2
  • 15
  • 31
2
votes
1 answer

No method error_messages selenium and capybara-webkit

When using capybara-webkit I have come across the issue of selenium not having an error_messages method, although, the documentation for capybara-webkit says that I should be able to access it through page.driver.error_messages once my flag on the…
2
votes
2 answers

where to put utility code used by a controller and a mailer?

Our app has "notifications" which you view through your inbox on the site, and can also get email to tell you about them. When you receive a notification, it contains a link to reply to the message in question. That might mean sending a PM back to…
Skud
  • 238
  • 2
  • 7
2
votes
1 answer

How to get mass assignment to utilize custom assignment methods

This is driving me totally nuts. I've got a custom setter and a custom getter for a phone number field: class Person < ActiveRecord::Base attr_accessible :phone def phone=(p) p = p.to_s.gsub(/\D+/, '') p = p[1..-1] if p.length == 11 &&…
kael
  • 6,585
  • 5
  • 21
  • 27
2
votes
1 answer

What to do if "git push heroku master" failed?

I have a working Rails app on my local Windows XP machine. I want to upload it on Heroku. I follow this tutorial https://devcenter.heroku.com/articles/rails3. When I ran git push heroku master, it failed: -----> Ruby/Rails app detected ----->…
Green
  • 28,742
  • 61
  • 158
  • 247
2
votes
1 answer

rails 3 best practice for handling attribute with fixed possibilities

For example if I have an attribute that is limited to a short list of values like: ways = {:way_1 => 1, :way_2 => 2, :way_3 => 3} What is the best practice for handling this attribute, for both cases: User can choose only one value (radio…