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
1 answer

Log analysis gem not working in production environment

Since memory leak was found in my rails app, I used request-log-analyzer to analyze the log. I added this in Germfile: gem "request-log-analyzer" and then run $ bundle install After that I tried to analyze the log file: $ request-log-analyzer…
2
votes
3 answers

How to get content type of a given url inside Javascript?

I want to know the content type of a given url input by the user inside my Javascript code. Actually, I have a drop-down list (html,csv,xls etc.) and I want to make it so when the user inputs an url, I want to detect the type of the content of the…
K M Rakibul Islam
  • 33,760
  • 12
  • 89
  • 110
2
votes
1 answer

sidekiq sending class as args gives stacklevel too deep error

After setting up sidekiq, I observed a strange behavior with respect to the arguments passed to the Sidekiq::Client.push method If I give self.class as args, then I either get a SystemStackError (stack level too deep) OR the server simply hung up,…
swapab
  • 2,402
  • 1
  • 27
  • 44
2
votes
0 answers

How to use update_elements with rails3-jquery-autocomplete?

I'm using rails3-jquery-autocomplete (Rails 3.2.10), and I think I may have two issues which may or may not be interacting. I have a "name" field (containing a given name) in a table 'pi'. I want this field to be autocomplete-able, and I want…
tmark
  • 33
  • 4
2
votes
1 answer

Multiple file upload option produces error rails

When I add the option, :multiple => true, to f.file_field :picture, in my view, it creates can't convert nil into String error when the form is submitted. Why does it do this and how can i fix it? Full Trace carrierwave (0.8.0)…
2
votes
1 answer

accessing associations within before_add callback in Rails 3

In Rails 3.2 I have been looking for a way to traverse the associations of an object within the before_add callback. So basically my use case is: class User < ActiveRecord::Base has_and_belongs_to_many :meetings end class Meeting <…
i0n
  • 916
  • 1
  • 8
  • 26
2
votes
0 answers

CarrierWave create storage directory for versions(thumb, large, medium)

I wanted to create different directories for different versions of the images. To achieve this what can be done to the "store_dir" method in Uploader rails 3.2 def store_dir "uploads/#{model.book.id}/resource" end version :large do process…
Rahul Chandra
  • 483
  • 7
  • 15
2
votes
1 answer

Rails 3 scope query

I have a model named "SessRequest", which contains fields "sess_start" (start datetime of session) and "sess_duration" (session duration in hours). So, end time of a session is: sess_start + sess_duration.hours I need to filter out all sessions…
Munish
  • 868
  • 9
  • 13
2
votes
2 answers

Before filter assign exception for entire controller

Every one of my Users has a has_many relation with Character. Now before they can use the application i need them to first select one Character as their main thus I want to keep redirecting them to members controller show method until they select…
2
votes
0 answers

jQuery not loading (jquery-rails 2.2.1 & rails 3.2.1)

I started a rails application (my first) a little while ago following the official walk-through blog and modified it. It seems my jQuery is not loading properly. My application.js looks as follows... // //= require jquery //= require jquery_ujs //=…
2
votes
1 answer

Passing a value from JQuery to my model and updating the database

I got a list of Students in Register model, and a join table called StudentRegisters. A Register has many students, and a Student can belong to many Registers. Originally I wanted to be able to mark students present/absent in the register/1 or…
omarArroum
  • 255
  • 1
  • 8
  • 19
2
votes
3 answers

Rails: How to find out what query is being run in SQL when a page loads?

I want to know what queries are being run when a User is interacting with different pages on the website? I'd also like to know how long each query took. How and where can I see that?
pratski
  • 1,448
  • 2
  • 22
  • 37
2
votes
1 answer

How to install json gem - Failed to build gem native extension

I'm trying to deploy a rails app to my ubuntu linux server. I'm using capistrano and bundler and when it gets to installing gems it fails with this error: Installing json (1.7.7) with native extensions Gem::Installer::ExtensionBuildError: ERROR:…
2
votes
1 answer

Spree internalization default_locale stays :en

Spree I18n 2.3 Setting the Default Locale The default locale for Spree is en. This can be changed by editing the :default_locale setting in the AppConfiguration model. This setting is ignored unless the relevant translation file are within…
Barna Kovacs
  • 1,226
  • 1
  • 14
  • 35
2
votes
1 answer

params.merge command is not safe?

So with a lot of banging head on the head I was finally able to write some code that I need like this: = link_to 'Clear', params.merge(:teachers => {:sort_column => 'teacher_name', :sort_direction => 'desc'}), :class => 'btn' Notice I have used…
Bohn
  • 26,091
  • 61
  • 167
  • 254
1 2 3
99
100