Skip to content

Instantly share code, notes, and snippets.

@gautamrege
Last active December 28, 2015 22:09
Show Gist options
  • Save gautamrege/7569356 to your computer and use it in GitHub Desktop.
Save gautamrege/7569356 to your computer and use it in GitHub Desktop.
Rails 3 to Rails 4 upgrade explained.
-Bundler.require(:default, Rails.env) if defined?(Bundler)
-if defined?(Bundler)
- Bundler.require(*Rails.groups(:assets => %w(development test)))
-end
+Bundler.require(:default, Rails.env)
- # Enable threaded mode
- # config.threadsafe!
+ # Eager load code on boot. This eager loads most of Rails and
+ # your application in memory, allowing both thread web servers
+ # and those relying on copy on write to perform better.
+ # Rake tasks automatically ignore this option for performance.
+ config.eager_load = true
diff --git a/Gemfile b/Gemfile
index 084537c..0a99d96 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,12 +1,12 @@
source 'http://rubygems.org'
-gem 'rails', '3.2.8'
+gem 'rails', '4.0.1'
gem 'sqlite3'
# asset pipeline
group :assets do
- gem 'sass-rails', '~> 3.2.3'
- gem 'coffee-rails', '~> 3.2.1'
+ gem 'sass-rails', '~> 4.0.1'
+ gem 'coffee-rails', '~> 4.0.1'
gem 'uglifier', '>= 1.0.3'
end
- activesupport (3.2.8)
- i18n (~> 0.6)
- multi_json (~> 1.0)
+ activesupport (4.0.1)
+ i18n (~> 0.6, >= 0.6.4)
+ minitest (~> 4.2)
+ multi_json (~> 1.3)
+ thread_safe (~> 0.1)
+ tzinfo (~> 0.3.37)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment