Browse files

We don't pass a different command to generate! anymore.

  • Loading branch information...
1 parent 8fe7b93 commit a82a32d7bf29e20c04ca5a96c4e7e66c92881f94 @parndt parndt committed Mar 28, 2011
Showing with 9 additions and 9 deletions.
  1. +9 −9 bin/refinerycms
View
18 bin/refinerycms
@@ -221,16 +221,16 @@ module Refinery
end
end
- def generate!(rails_command = nil)
- if rails_command.to_s.length == 0
- # Generate a rails application
- rails_command = "rails new \"#{@app_path}\""
- rails_command << " --database #{@options[:database][:adapter]}"
- rails_command << " --force" if @options[:force]
- rails_command << " --skip-test-unit --skip-prototype"
- rails_command << " -m http://jruby.org" if defined? JRUBY_VERSION
- end
+ def generate!
+ # Generate a rails application
+ rails_command = "rails new \"#{@app_path}\""
+ rails_command << " --database #{@options[:database][:adapter]}"
+ rails_command << " --force" if @options[:force]
+ rails_command << " --skip-test-unit --skip-prototype"
+ rails_command << " -m http://jruby.org" if defined? JRUBY_VERSION
+
rails_output = run_command(rails_command, {:cd => false})
+
# Detect non-success or a blank rails output or starting with "Can't initialize" or "Error"
if !$?.success? or rails_output.to_s.length == 0 or rails_output =~ /^(Can't\ initialize|Error)/
puts "Generating Rails application failed. Exiting..."

0 comments on commit a82a32d

Please sign in to comment.