Created
September 13, 2011 17:47
-
-
Save ecpplus/1214488 to your computer and use it in GitHub Desktop.
Rails3.0.x to Rails3.1.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= stylesheet_link_tag 'application' %> | |
<%= javascript_include_tag 'application' %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//= require jquery | |
//= require jquery_ujs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Bundler.require(:default, Rails.env) if defined?(Bundler) # <- delete this | |
# add | |
if defined?(Bundler) | |
# If you precompile assets before deploying to production, use this line | |
Bundler.require *Rails.groups(:assets => %w(development test)) | |
# If you want your assets lazily compiled in production, use this line | |
# Bundler.require(:default, :assets, Rails.env) | |
end | |
module MyApp | |
class Application < Rails::Application | |
... | |
config.assets.enabled = true # add | |
config.assets.version = '1.0' # add | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#config.action_view.debug_rjs = true # <- delete this |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem 'rails', '3.1.0' | |
... | |
# add for assets | |
gem 'sass' | |
gem 'coffee-script' | |
gem 'uglifier' | |
gem 'jquery-rails' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir app/assets | |
mv public/javascripts app/assets | |
mv public/stylesheets app/assets | |
mv public/images app/assets | |
cd app/assets/javascripts && rm controls.js dragdrop.js effects.js rails.js prototype.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.assets.compress = true | |
config.assets.compile = true | |
config.assets.digest = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-MyApp::Application.routes.draw do |map| | |
+MyApp::Application.routes.draw do |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment