简体   繁体   English

将Ruby on Rails项目转换为JRuby on Rails项目

[英]Convert a Ruby on Rails project to a JRuby on Rails project

is there any particular way to convert a Ruby on Rails project to a JRuby on Rails project? 有什么特别的方法可以将Ruby on Rails项目转换为JRuby on Rails项目吗? 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. 现在需要让Rails端通过RMI与Jav​​a服务器通信,因此想知道如何进行转换。 Thanks. 谢谢。

As @Karl says, it pretty much works but there are a number of caveats you should be aware of: 正如@Karl所说,它几乎有用,但你应该注意一些警告:

  • The database adapters will be different from the ones you may be used to. 数据库适配器将与您可能习惯的不同。 They're based on JDBC . 它们基于JDBC For example, the MySQL adapter install is described here 例如, 此处描述了MySQL适配器安装
  • You will generally deploy to Java application servers in production such as Glassfish , Tomcat or Jetty . 您通常会部署到生产中的Java应用程序服务器,例如GlassfishTomcatJetty Typically this is done using Warbler 通常这是使用Warbler完成的
  • Certain gems with native extensions may not work. 某些具有原生扩展名的宝石可能无效。 See here for details on the what is required 有关所需内容的详细信息,请参见此处

It pretty much just works, you simply run it with JRuby instead of Ruby. 它几乎可以工作,你只需用JRuby而不是Ruby运行它。

You might be interested in this though: http://jrubyist.wordpress.com/2009/07/15/jruby-and-sqlite3-living-together/ 您可能对此感兴趣: http//jrubyist.wordpress.com/2009/07/15/jruby-and-sqlite3-living-together/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM