Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

* allow to use this template with jruby with newer rails versions as …

…well

* since 'bundle install' runs at the end of the rails template then it install the rails version with which the application got generated
  • Loading branch information...
commit 5705632955dd20cf9c74149a62aad466af0de0fc 1 parent c071ba3
@mkristian authored
Showing with 3 additions and 3 deletions.
  1. +1 −1  templates/rails/database.yml.rb
  2. +2 −2 templates/rails/gemfile.rb
View
2  templates/rails/database.yml.rb
@@ -1,7 +1,7 @@
# TODO think about a better way
db_name = app_path.split('/').last
-database = options[:database]
+database = options[:database].sub(/jdbc/, '')
database = 'postgres' if database == 'postgresql'
database = 'sqlite' if database == 'sqlite3'
View
4 templates/rails/gemfile.rb
@@ -3,7 +3,7 @@
DATAMAPPER = '#{DATAMAPPER}'
RSPEC = '#{RSPEC}'
-database = options[:database]
+database = options[:database].sub(/jdbc/, '')
database = 'postgres' if database == 'postgresql'
database = 'sqlite' if database == 'sqlite3'
@@ -12,7 +12,7 @@
<<-GEMFILE
source 'http://rubygems.org'
-RAILS_VERSION = '~> 3.1.1'
+RAILS_VERSION = '#{Rails::VERSION::STRING}'
DM_VERSION = '~> 1.2.0'
gem 'activesupport', RAILS_VERSION, :require => 'active_support'
Please sign in to comment.
Something went wrong with that request. Please try again.