ruby-on-rails-3.1 Questions
5
Solved
Is it possible to create an attribute for a class that is an array? I tried reading this but I didn't get much out of it. I want to do something like this:
class CreateArches < ActiveRecord::Mi...
Stealing asked 11/11, 2011 at 17:32
3
Solved
I want to run a task every minute on Heroku to check if conditions are met to time-out certain user tasks. I can only run a Heroku cron job every hour, so what's the best way to set up a timed task...
Ticon asked 6/9, 2011 at 6:56
10
Solved
Rails 3.1 Passenger on Apache Development environment
When I go to access the index (i.e. GET) for a route I get:
Errno::EACCES in Crb_agendas#index
Showing /var/www/crbagenda/app/views/layouts/a...
Disclose asked 14/11, 2011 at 20:43
7
I have written a Rails 3.1 engine with the namespace Posts. Hence, my controllers are found in app/controllers/posts/, my models in app/models/posts, etc. I can test the models just fine. The spec ...
Hokkaido asked 5/3, 2011 at 0:12
2
I'm using SendGrid's SMTP API in my Rails application to send out emails. However, I'm running into troubles testing the email header ("X-SMTPAPI") using RSpec.
Here's what the email looks like (r...
Rosewood asked 20/12, 2011 at 8:25
4
Solved
I have a staging server hosted on heroku, I just want to bring it down, but not destroy the app. How can I do it? Do I have any command like 'heroku stop' like 'heroku restart' for restarting?
OR ...
Depressomotor asked 6/2, 2012 at 6:44
5
Solved
So right now it is 2:54 PM PST in San Francisco. For some reason, this code block is not returning 12:54 PM HST in Hawaii. Am I missing something here? I would expect this code to return me the cur...
Kramer asked 3/1, 2012 at 22:52
4
Solved
I'd like to take advantage of the force_ssl feature in rails 3.1rc4.
class ApplicationController < ActionController::Base
force_ssl
end
Problem is this breaks most/all of my existing RSpec ...
Washstand asked 22/7, 2011 at 3:12
3
Solved
I want to know how to check if the model already exists in the project or not?
When user tries to create a model programatically using the same model name, need to check if it already exists or no...
Plated asked 3/8, 2012 at 10:25
5
Solved
I found this great blog post on how to use Rack::Proxy as a separate proxy app. The article explains how he uses Rack::Proxy to proxy requests to http://localhost:3000 to an app on port 3001 and re...
Yeld asked 15/6, 2012 at 20:39
6
Solved
I have set the time zone in /config/application.rb, and I expect all times generated in my app to be in this time zone by default, yet when I create a new DateTime object (using .new), it creates i...
Incalescent asked 12/7, 2012 at 2:12
6
Solved
I tried googling this and I haven't found an answer yet to my problem.
I am trying to run a simple controller script through rails and it is giving me this error when I reach the page.
ExecJS::Ru...
Ditter asked 2/12, 2011 at 20:48
5
Solved
I am developing a Ruby on Rails app. My question is more about Ruby syntax.
I have a model class with a class method self.check:
class Cars < ActiveRecord::Base
...
def self.check(name)
se...
Exclamatory asked 14/12, 2011 at 9:46
4
Solved
I'm upgrading a rails app with lots of SCSS stylesheets to use the asset pipeline, and need to include some global variables and mixins for each file.
Adding several @import directives at the top ...
Pelvis asked 16/1, 2012 at 23:35
7
i want to upload CSV files through the activeadmin panel.
on the index page from the resource "product" i want a button next to the "new product" button with "import csv file".
i dont know where ...
Debutante asked 13/10, 2011 at 13:32
2
Solved
I'd like to generate check box with custom html attributes (to use UJS later). Here is my view code
<%= check_box_tag "data-toggle-completed" => "" %>
it gives me
<input id="__data-...
Leckie asked 24/11, 2012 at 11:26
6
I would like to serve client side templates that have been pre-processed through HAML. I have tried using the haml_assets gem and adding the following code to an initializer:
Rails.application.ass...
Wellheeled asked 14/10, 2011 at 15:59
9
Solved
After installing devise MODEL User i got this.
class DeviseCreateUsers < ActiveRecord::Migration
def self.up
create_table(:users) do |t|
t.database_authenticatable :null => false
t.recov...
Octagonal asked 8/10, 2011 at 2:54
2
Solved
I am getting the following error frequently in my application. If I restart my rails application this error will not appear for some time.
Rails - 3.1.3
Ruby - 1.9.3
ActiveRecord::StatementInv...
Silvers asked 17/4, 2013 at 11:53
6
Solved
I'm working on a Rails 3.1 app and I'd like to set specific routes for the different languages the app is going to support.
/es/countries
/de/countries
…
For the default language ('en'), I don't...
Hotchkiss asked 22/11, 2011 at 9:4
5
Solved
I get an error that look like this:
undefined method `post_image_will_change!' for #<Post:0xf4e9184>
app/controllers/posts_controller.rb:43:in `new'
app/controllers/posts_controller.rb:43:in...
Compassionate asked 20/9, 2011 at 20:50
9
Solved
I want to install ruby on my Linux Mint 12.
I am following this tutorial and this one.
when I run rvm install 1.9.3 I see this error:
Installing Ruby from source to: /usr/share/ruby-rvm/rubies/r...
Melodymeloid asked 24/2, 2012 at 23:26
3
Solved
I'm trying to use the mysql2 gem with rails 3.1.0.rc6, but I'm having some problem with my mysql client.
I'm getting this message when trying to start my server.
Incorrect MySQL client library ...
Lacielacing asked 21/8, 2011 at 15:33
4
Solved
Has anyone managed to set maximum field lenghts for text fields
How can i set the maximum length of a text field.
Here is the code iam using
<%= text_field_tag(:create_text), :input_html =>...
Architectonics asked 23/4, 2013 at 10:10
3
Solved
I'm generating some js output for each user using a template named example.js.erb. This is basically a javascript file where I have to put in the user's unique details. I'm using this inside of a w...
Underpart asked 11/11, 2011 at 20:3
© 2022 - 2024 — McMap. All rights reserved.