Top "Ruby-on-rails-4" questions

For issues specific to version 4 of Rails.

Using logger in Rails 4

I'm working on a Rails 4 project, and I can't seem to make anything show up in my development log when …

logging ruby-on-rails-4
An error occurred while installing pg (0.17.1), and Bundler cannot continue

I just installed Rails 4.0.2 and when creating a new app, in the bundle stage I get: Installing pg (0.17.1) Gem::Installer::…

ruby-on-rails macos postgresql ruby-on-rails-4
How to display a Rails flash notice upon redirect?

I have the following code in a Rails controller: flash.now[:notice] = 'Successfully checked in' redirect_to check_in_path …

ruby-on-rails ruby-on-rails-3 ruby-on-rails-3.2 ruby-on-rails-4 rails-flash
There was an error while trying to load the gem 'uglifier'. (Bundler::GemRequireError)

Why am i getting this error? shibly@mybox:~/blog$ rails server /home/shibly/.gem/ruby/2.2.4/gems/bundler-1.11.2/lib/bundler/runtime.…

ruby-on-rails ruby-on-rails-4 server
Ruby on Rails - "Add 'gem sqlite3'' to your Gemfile"

I was following the Rails tutorial, but I got stuck when it said to type rails server in the blog …

ruby-on-rails ruby sqlite ruby-on-rails-4 ruby-2.0
Rails 4 multiple image or file upload using carrierwave

How can I upload multiple images from a file selection window using Rails 4 and CarrierWave? I have a post_controller …

ruby-on-rails-4 carrierwave
Rails 4 - Gem::LoadError: Specified 'mysql2' for database adapter, but the gem is not loaded

In my gemfile I have: gem 'mysql2' My database.yml is as follows: default: &default adapter: mysql2 database: &…

ruby-on-rails ruby-on-rails-4 ruby-on-rails-4.1 mysql2 ruby-on-rails-4.2
Rails 4, how to correctly configure smtp settings (gmail)

I am trying to create a contact form in Rails 4. I did some digging around here and was able to …

ruby-on-rails email ruby-on-rails-4 smtp
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 …

ruby-on-rails ruby-on-rails-3 ruby-on-rails-4 activerecord rails-activerecord