Category "ruby-on-rails-3"

Your bundle is locked to ffi (1.11.0), but that version could not be found in any of the sources listed in your Gemfile

I get this error when starting the rails server: I've tried gem install, gem update, bundle update, bundle install. Your bundle is locked to ffi (1.11.0), but

Rails: validate uniqueness of two columns (together)

I have a Release model with medium and country columns (among others). There should not be releases that share identical medium/country combinations. How would

Incrementing letters using .next

def home letter = 'A' @markers = Location.all.to_gmaps4rails do |loc, marker| marker.infowindow render_to_string(partial: '/locations/info',

How to display Datatable tabletools (copy, csv, excel, pdf, save) in ruby on rails

I am using Datatable in my ruby on rails application. I follow the same one which is here.. https://github.com/rweng/jquery-datatables-rails And My datatable

Rails log too verbose

How can I prevent Rails to log too much? Here is a typical trace in my production.log file, many partials, cache hits... It's useful in development but I don't

Find version where specific attribute has changed in papertrail

I'm using the Papertrail gem in my project and have searched extensively to try and find how to do the following. What I'd like to do is find the version of my

Rails override updated_at with another column to get correct cache_key

Am using Rails 3.2.13. We use last_modified_time as our last updated column. My problem is that when i do model.cache_key it does not take into account the :la

Add a CSS class to <%= f.submit %>

My question is easy: <%= f.submit %> Where does the class declaration go? I'm getting errors on multiple attempts.

AssociationTypeMismatch and FactoryGirl

This has been causing some frustration recently... It seems that using Factories in my cucumber tests, in some situations causes AssociationTypeMismatch error

Is it possible to set ENV variables for rails development environment in my code?

I know that I can set my ENV variables in bash via export admin_password = "secret" But is there a way to do it in my rails source code somewhere? My first a

How can I make a mock of an authenticated user?

I am having trouble showing a mock logged in user in cucumber. When a user is logged in they can, make a post. My Errors: (::) failed steps (::) undefined