rvm jruby-1.6.3 # Will set your environment for JRuby 1.6.3 version.Time to create rails app. This will generate a rails app for JRuby platform. Things like database.yml, Gemfile will generated specifically for JRuby platform.
rails new myappdatabase.yml
# SQLite version 3.x # gem 'activerecord-jdbcsqlite3-adapter' development: adapter: sqlite3 database: db/development.sqlite3 # Warning: The database defined as "test" will be erased and # re-generated from your development database when you run "rake". # Do not set this db to the same as development or production. test: adapter: sqlite3 database: db/test.sqlite3 production: adapter: sqlite3 database: db/production.sqlite3Gemfile
source 'http://rubygems.org' gem 'rails', '3.0.10.rc1' gem 'jruby-openssl' # Bundle edge Rails instead: # gem 'rails', :git => 'git://github.com/rails/rails.git' gem 'activerecord-jdbcsqlite3-adapter' # Use unicorn as the web server # gem 'unicorn' # Deploy with Capistrano # gem 'capistrano' # To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+) # gem 'ruby-debug' # gem 'ruby-debug19', :require => 'ruby-debug' # Bundle the extra gems: # gem 'bj' # gem 'nokogiri' # gem 'sqlite3-ruby', :require => 'sqlite3' # gem 'aws-s3', :require => 'aws/s3' # Bundle gems for the local environment. Make sure to # put test-only gems in this group so their generators # and rake tasks are available in development mode: # group :development, :test do # gem 'webrat' # endYou can see in Gemfile the changes. It requires
gem 'jruby-openssl'
gem and gem 'activerecord-jdbcsqlite3-adapter'
gem. Which is required for JRuby platform.
Same work to generate for mysql and postgres.
rails new myapp -d mysqlAnd that’s all.!! Your Application is ready to run. Just do
bundle install
and all set. wOOtt..!!
Post comments and discuss things if you guys still facing any issue. You can also post issue on Rails Issues and ask me to look into that.
Some Useful links related to post:
Cheers,