Created
April 15, 2012 14:20
-
-
Save travisvalentine/2393098 to your computer and use it in GitHub Desktop.
Fix for Heroku in production, changing Gemfile and Rakefile
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
# Fix for error: `ActionView::Template::Error ('twitter/bootstrap.less' wasn't found.` | |
# Gems inside of assets aren't required in production, but we need bootstrap in production | |
# So pull the bootstrap gem outside of assets | |
# You also need to remove `app/assets/stylesheets/bootstrap.css.less` if you haven't already. | |
gem 'twitter-bootstrap-rails' | |
group :assets do | |
.. | |
end | |
group :production do | |
gem 'pg' | |
end | |
group :development, :test do | |
gem 'sqlite3' | |
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
# If you're not seeing errors and nothing is working, be sure to have migrated your db in heroku | |
# After pushing to git, pushing to heroku, run `heroku run rake db:migrate` | |
# You can also run `heroku run rake db:seed` if you have a `seeds.rb` |
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
# Fix for error: `no such file to load -- rspec/core/rake_task` | |
# Heroku builds apps without the Gemfile's development/test groups, which is where we have rspec installed | |
# So when Heroku runs the Rakefile it expects rspec even though it doesn't exist in production | |
# That's why we need to add an unless to make sure we only run rspec outside of production | |
unless Rails.env.production? | |
begin | |
require 'rspec/core/rake_task' | |
task :default => :spec | |
RSpec::Core::RakeTask.new("spec:acceptance") do |t| | |
t.rspec_opts = "--tag acceptance" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment