Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use 'bundle exec rake' instead of 'rake' for apps with a Gemfile.

  • Loading branch information...
commit 73e82cdc2f8b8974bf5b5d6bcd5c4e89728aac1a 1 parent 824ef4c
@pwnall authored
View
2  CHANGELOG
@@ -1,3 +1,5 @@
+v0.6.92. Use 'bundle exec rake' instead of 'rake' for apps with a Gemfile.
+
v0.6.91. Support for the asset pipeline in Rails 3.1.
v0.6.90. Workaround daemonz permission issue.
View
12 lib/rails_pwnerer/app/assets.rb
@@ -18,14 +18,22 @@ def update(app_name, instance_name)
# removes asset caches from the application directory
def cleanup_app_caches(app_name, instance_name)
Dir.chdir RailsPwnerer::Config[app_name, instance_name][:app_path] do
- Kernel.system "rake assets:clean RAILS_ENV=production"
+ if File.exist?('Gemfile')
+ Kernel.system 'bundle exec rake assets:clean RAILS_ENV=production'
+ else
+ Kernel.system 'rake assets:clean RAILS_ENV=production'
+ end
end
end
# builds up the asset caches
def build_app_caches(app_name, instance_name)
Dir.chdir RailsPwnerer::Config[app_name, instance_name][:app_path] do
- Kernel.system "rake assets:precompile RAILS_ENV=production"
+ if File.exist?('Gemfile')
+ Kernel.system 'bundle exec rake assets:precompile RAILS_ENV=production'
+ else
+ Kernel.system 'rake assets:precompile RAILS_ENV=production'
+ end
end
end
end
View
6 lib/rails_pwnerer/app/db/mysql.rb
@@ -92,7 +92,11 @@ def configure_rails(app_name, instance_name)
def migrate_database(app_name, instance_name)
Dir.chdir RailsPwnerer::Config[app_name, instance_name][:app_path] do
# now migrate the database
- system "rake db:migrate RAILS_ENV=production"
+ if File.exist?('Gemfile')
+ Kernel.system 'bundle exec rake db:migrate RAILS_ENV=production'
+ else
+ Kernel.system 'rake db:migrate RAILS_ENV=production'
+ end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.