ruby-on-rails-3.1 Questions
7
Solved
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
...
Tremolite asked 25/9, 2011 at 16:17
2
Solved
I am creating a new project:
rails new ggg --database=mysql
and get following output:
create
create README
create Rakefile
create config.ru
create .gitignore
create Gemfile
create app
c...
Irby asked 11/9, 2011 at 13:30
4
Solved
I need to know, from inside of a layout of a mountable engine, what path it's currently being mounted on. What would be the way to do it?
E.g. my routes.rb contains the following line:
mount Bac...
Psycholinguistics asked 28/9, 2011 at 7:20
5
Solved
If I do the following:
@user.name = "John"
@user.url = "www.john.com"
@user.save
If I use after_save
@user.url = "www.johnseena.com"
@user.save
What will happen when I do this?
I believe it...
Betty asked 11/10, 2012 at 8:11
5
Solved
I am trying to do a simple test for my model Course, I have wrote this factory:
FactoryGirl.define do
factory :course do
name 'How to be happy ?'
end
end
the course_spec.rb:
require "rspec"
...
Gyve asked 3/1, 2012 at 5:31
3
Solved
I'm ready to deploy my Rails 3.1 app into production, and since I'm using the asset pipeline, I need to precompile my assets. However, when I try this, I get an error apparently related to compilin...
Alansen asked 13/1, 2012 at 16:42
7
Solved
My deployments are slow, they take at least 3 minutes. The slow Capistrano task during deploy is assets:precompile. This takes probably 99% of the total deploy time. How can I speed this up? Should...
Ashtray asked 26/1, 2012 at 9:23
7
Solved
I'm using Rails 3.1. I'm trying to figure this out, and to my surprise, it is starting to seem that rails does not come with this method at all. Maybe im wrong.
Can anyone show how I can get a ful...
Desiderative asked 29/9, 2011 at 12:11
2
Solved
When app is deployed with capistrano errors occur in production.log.
Compiled signup.css (30ms) (pid 31797)
Warning. Error encountered while saving cache /home/deployer/apps/example.com/releases/2...
Tantalize asked 16/3, 2014 at 0:7
4
Solved
I want to create a model in rails:
rails generate model ABCThing
So this will create a table, abc_things. Great. The problem comes with the controller and routing. I want my controller to be:
c...
Hazlip asked 20/9, 2012 at 8:51
5
Solved
Using Rails 3.1.3 and I'm trying to figure out why our counter caches aren't being updated correctly when changing the parent record id via update_attributes.
class ExhibitorRegistration < Acti...
Malignancy asked 22/2, 2012 at 21:45
7
Solved
I'm using Ruby 1.9.3p0 on Mac OS 10.6.8 (installed using rvm). When I attempt to create a new Rails application using an application template hosted on GitHub, with this (for example):
$ rails ne...
Overplay asked 12/11, 2011 at 0:4
4
Solved
Is there a built-in way to determine if an asset exists without resorting to File.exists?(File.join(Rails.root, "foo", "bar", "baz")) and that looks through the asset paths.
My app goes and fetche...
Quickel asked 21/7, 2011 at 21:23
2
Solved
I would like to have an additional data attribute on an input tag generated by simple_form.
The following does not work:
<%= f.input :date, :as => 'date_picker', :data => {:datepicker =&g...
Connected asked 30/11, 2011 at 13:0
2
Solved
I have an application that generate invoices. The system works with three currencies: Pounds, US Dollars and Euros. As part of the requirements, invoices must have the total amount displayed in eng...
Ropable asked 29/5, 2012 at 0:24
3
Solved
def create
@addpost = Post.new params[:data]
if @addpost.save
flash[:notice] = "Post has been saved successfully."
redirect_to posts_path
else
flash[:notice] = "Post can not be saved, please ...
Bohannan asked 7/12, 2011 at 17:41
4
Solved
I want to write a gem that, once bundled to a Rails 3.1 Gemfile, includes some boilerplate CSS and JS files.
I know about generators, but how could I do this without them so that the gem's effect...
Jess asked 17/7, 2011 at 19:34
4
Solved
I have a form that is using form_tag and not sure how to use it with the simple_form gem. This is how my form looks:
<%= form_tag create_multiple_prices_path, :method => :post do %>
<...
Cognate asked 18/2, 2012 at 15:0
8
Solved
I'm new to the Asset Pipeline, having just migrated over from Rails 3.0. I'm trying to get CKEditor into the pipeline, but all the gems for it are really unclear about how they work, and have littl...
Lathy asked 27/10, 2011 at 10:59
8
Solved
For the following code:
<%= link_to "Some Page", some_path %>
How do I apply a css class current using the current_page? helper method?
Or if some other better way is available?
Kilian asked 18/12, 2011 at 15:33
5
Solved
I am able to export table data to a CSV file, however there is a blank row after every record. Why and how do i fix it?
in index.html.erb
<%= link_to "Export to csv", request.parameters.merge(...
Hoptoad asked 18/10, 2011 at 18:58
1
pdfkit gem successfully installed in my machine. Then I run gem install wkhtmltopdf-binary and output was
Successfully installed wkhtmltopdf-binary-0.9.9.1
1 gem installed
Installing ri documentat...
Fetation asked 6/9, 2012 at 20:3
3
Solved
I've looked around a bit and didn't find similar errors reported.
I don't recall having modified my production.rb. And for good measure, here's my application.rb
Here's the stack trace from Herok...
Jernigan asked 13/10, 2011 at 15:10
7
Solved
I've tried using google to answer this seemingly simple question, but to my surprise, it didn't help.
I have code in my rails application currently using the 'prepare' method with the mysql gem. O...
Darkle asked 28/3, 2012 at 11:21
7
Solved
This is how looks my Gemfile:
source 'http://rubygems.org'
gem 'rails', '3.1.2'
#gem 'sqlite3'
gem 'mysql2'
gem "rvm", "~> 1.9.2"
gem 'authlogic'
gem "taps", "~> 0.3.23"
gem "paperclip", "...
Aerogram asked 25/1, 2012 at 19:50
© 2022 - 2024 — McMap. All rights reserved.