Convert a Ruby on Rails project to a JRuby on Rails project

你离开我真会死。 提交于 2019-11-30 08:32:52

问题


is there any particular way to convert a Ruby on Rails project to a JRuby on Rails project? There now is a need to get the Rails side to talk to a Java server via RMI so was wondering how to make the conversion. Thanks.


回答1:


As @Karl says, it pretty much works but there are a number of caveats you should be aware of:

  • The database adapters will be different from the ones you may be used to. They're based on JDBC. For example, the MySQL adapter install is described here
  • You will generally deploy to Java application servers in production such as Glassfish, Tomcat or Jetty. Typically this is done using Warbler
  • Certain gems with native extensions may not work. See here for details on the what is required



回答2:


It pretty much just works, you simply run it with JRuby instead of Ruby.

You might be interested in this though: http://jrubyist.wordpress.com/2009/07/15/jruby-and-sqlite3-living-together/



来源:https://stackoverflow.com/questions/3216128/convert-a-ruby-on-rails-project-to-a-jruby-on-rails-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!