Questions tagged [rails-3.1]

Ruby on Rails version 3.1.0 is a specific version of Ruby on Rails. It was released on August 30th, 2011. Use this tag for issues related to development in Ruby on Rails version 3.1

Ruby on Rails version 3.1.0 is a specific version of Ruby on Rails. It was released on August 30th, 2011. Use this tag for issues related to development in Ruby on Rails version 3.1

65 questions
30
votes
7 answers

heroku run console returns 'Error connecting to process'

I have deployed a rails 3.1 app to Heroku Cedar stack, and am trying to perform a: heroku run rake db:migrate it returns: Running console attached to terminal... Error connecting to process I also try to simply launch the console: heroku run…
jdcravens
  • 577
  • 1
  • 4
  • 15
26
votes
2 answers

URL of images in JavaScript code using Rails 3.1 asset pipeline?

In CSS files, you can get the proper name of an image asset (with the fingerprint) by using: background-image: url(image-url("rails.png")) but how do you do the same from a JavaScript file?
pupeno
  • 256,034
  • 114
  • 324
  • 541
24
votes
5 answers

Access Main App Helpers when overridings a Rails Engine View/Layout

I have created a simple Rails Engine to provide some general functionality(photo gallery) to an application. I want to be able to override the standard _header partial so that the menu for the gallery matches that of my main application. In my…
7
votes
1 answer

Rails 3.1.3 using anchor attribute with link_to tag from posts/index to posts/show/id not working

I am using a link_to tag on my posts/index view and want to link it to my posts/show/id view with an anchor that makes it scroll down to the comments form. For some reason I can't get the anchor to work. Here is my code: In posts/index <%= link_to…
kwyoung11
  • 958
  • 1
  • 9
  • 31
7
votes
5 answers

Upgrade from rails 3.1.3 to rails 3.2.1. Error with assets

I try to upgrade my application from rails 3.1.3 to rails 3.2.1 and I have a problem with assets. I have this kind of error : ActionController::RoutingError (No route matches [GET] "/assets/logos/opera_logo.png"): actionpack (3.2.1)…
Dougui
  • 6,762
  • 6
  • 40
  • 77
7
votes
1 answer

Capistrano for Rails 3.1

I am using Rails 3.1 and Capistrano, I get No such file or directory errors for /public/images, /public/stylesheets, and public/javascripts errors. Searching the Internet, I found a number of blog posts suggesting set :normalize_asset_timestamps,…
Steve Harman
  • 741
  • 1
  • 7
  • 11
6
votes
1 answer

using scope in Rails custom validations

I want to apply scope limiter in my custom validation I have this Product Model which has make,model,serial_number, vin as a attributes Now I have a custom validation to check against vin if vin is not present to check for combination of…
5
votes
1 answer

How to use Jade/Haml with Rails 3.1 asset pipeline and backbone.js

Currently I am using backbone-rails in my Rails app. I would like to know how to use client side Haml/Jade backbone.js with that gem and the rails asset pipline.
denysonique
  • 14,089
  • 6
  • 34
  • 39
5
votes
0 answers

render_to_string rails 3.1

I try this: :content => render_to_string(:template => "#{path[:controller]}/#{path[:action]}.html.haml") In my json, but I use kaminari to paginate pages and a receive this error: ActionView::Template::Error (Missing partial kaminari/paginator…
user979029
  • 51
  • 2
4
votes
1 answer

RSpec with Rails 3.1 No route matches error, except that the route exists

Does anybody have any idea why when I run my specs it says that this route does not exist, when it clearly does? Here is the relevant code in the controller: class JobsController < ApplicationController before_filter :find_job, :only => [:show,…
Travis
  • 696
  • 7
  • 10
4
votes
2 answers

Devise: Migrate Google Open ID to Google OAuth

Does anyone have clues about how to do this? I'm basically trying to replace the strategy for "Connect With Google" from OpenID to OAuth. The challenge is identifying an old user (user on Google open ID) when a user signs in under the new OAuth…
mahemoff
  • 38,430
  • 30
  • 133
  • 196
3
votes
1 answer

Persist Facebook profile picture url on Rails 3

I added Facebook authentication to my Rails 3 app according to this tutorial, and it's working great. Now I want to display the user's name and profile picture, once he/she has logged in to the app using Facebook. I tried following the solution…
humairatasnim
  • 218
  • 1
  • 4
  • 10
3
votes
1 answer

How do I display the user's location with a marker in gmaps4rails?

I have been trying to get a custom use of gmaps4rails running, and I have the code set to display my string of json coordinates on the map, and the center on user IS working, I can zoom into my location from home, work and my phone. I just cannot…
keade
  • 137
  • 1
  • 11
2
votes
2 answers

Rails 3 asset pipeline: How to prevent some asset files from being loaded for everyone (eg. browser-specific)

I want to server the 'excanvas.min.js' file only to the Internet Explorer and not to other browsers. So I did in my application.html.erb: