Questions tagged [ruby-on-rails-4.1]

For issues specific to version 4.1 of Rails. If your question applies to Ruby on Rails in general, use the tag [ruby-on-rails].

Ruby on Rails 4.1 is a stable revision branch of Ruby on Rails, "an open-source web framework that's optimized for programmer happiness and sustainable productivity."

See Ruby on Rails 4.1 Release Notes for more information.

Resources:

  1. Announcement
  2. API Documentation
  3. Rails 4.1 Guides
  4. Upgrading from Rails 4.0 to Rails 4.1

See also:

473 questions
182
votes
30 answers

Failed to decode downloaded font, OTS parsing error: invalid version tag + rails 4

I am doing assets pre-compile, and running the application in production mode. After compilation when I load the my index page I got followings warnings in the chrome console: Failed to decode downloaded font:…
Deepti Kakade
  • 3,053
  • 3
  • 19
  • 30
153
votes
10 answers

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: <%= ENV['db_name'] %> username: <%= ENV['db_user'] %> password: <%= ENV['db_pass'] %> host: <%= ENV['db_host'] %> pool:…
79
votes
14 answers

TZInfo::DataSourceNotFound error starting Rails v4.1.0 server on Windows

I have created a new application using Ruby on Rails v4.1.0. When attempting to start a server or console on Windows, I am encountering the following error: $ rails server Booting WEBrick Rails 4.1.0 application starting in development on…
John
  • 1,677
  • 4
  • 15
  • 26
48
votes
6 answers

In Rails 4.1, how to find records by enum symbol?

Assume I have this model: class Conversation < ActiveRecord::Base enum status: [ :active, :archived ] end How can I find all active conversations without using the numeric value of the enum or without having to iterate over each conversation? …
44
votes
5 answers

Asset filtered out and will not be served: add `config.assets.precompile

I just migrated my Application to rails 4.1.0 from 4.1.rc2. Started getting these errors for my JS files ActionView::Template::Error: Asset filtered out and will not be served: add `config.assets.precompile += %w( my_js )` to…
AnkitG
  • 6,438
  • 7
  • 44
  • 72
34
votes
2 answers

ActionController::InvalidCrossOriginRequest in Controller Test

When running legacy controller tests like this one: get :edit, id: object.id, format: :js My tests began failing in Rails 4.1 with the following error: ActionController::InvalidCrossOriginRequest: Security warning: an embedded