Forum: JRuby preferred way to start creating an app.

B0f6d8efcf671ea3163449e231264cc4?d=identicon&s=25 Msan Msan (msan)
on 2013-07-18 21:01
(Received via mailing list)
I think a lot of guys here use rails with jruby.
How do you create an application?
Simply with

 jruby -S rails new myapp -m http://jruby.org

or

rails new myapp -m
https://raw.github.com/RailsApps/rails-composer/ma...
2c0c4cf3ccc8da22f7c3b9586ce1cd70?d=identicon&s=25 Christian MICHON (Guest)
on 2013-07-19 10:38
(Received via mailing list)
On Thu, Jul 18, 2013 at 9:00 PM, Mauro Sanna <mrsanna1@gmail.com> wrote:

>
Unless I missed your point, this is a rails question, not a jruby
question:
I suggest you ask it to the right mailing list.
Caa2df9372ffa0a9e95b2bab1e8fea34?d=identicon&s=25 Karol Bucek (Guest)
on 2013-07-19 14:49
(Received via mailing list)
Hi Mauro, you simply create your new app - no special setting should be
necessary.

Rails core should detect that you're on JRuby and sets-up gem
'activerecord-jdbc-adapter' (and rhino as well)
or if you're using a built-in supported DB such as MySQL ... than sets
up
gem 'activerecord-jdbcmysql-adapter' in your Gemfile.

You can safely create an app from MRI and than simply add

gem 'activerecord-jdbcmysql-adapter', platform: :jruby
gem 'therubythino', platform: :jruby

and maybe change a few MRI specific such as :

gem 'mysql2', platform: :ruby
...
gem 'therubyracer', platform: :ruby

and it should all work under both JRuby as well as MRI.

There's only one catch for AR-JDBC adapter - 1.3.0 is in the making and
latest stable (1.2.9) does not officialy support Rails 4.x ... you can
use
a beta or master for now.

Hope it helps, K.


On Fri, Jul 19, 2013 at 10:36 AM, Christian MICHON <
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.