我希望能夠將Heroku的jruby rails 3.1應用程序隱藏起來。如何在Heroku上部署JRuby Rails 3.1.x
Heroku現在支持Java:http://blog.heroku.com/archives/2011/08/25/java/ 假設應該可以部署JRuby rails應用程序。 這裏有一個教程普通的Java:http://devcenter.heroku.com/articles/java和另一個位置:http://devcenter.heroku.com/articles/spring-mvc-hibernate
下面是在Heroku上一個JRuby的末日應用教程:http://chris.chowie.net/2011/08/28/Sinatra-with-JRuby-on-Heroku/ 爲了得到這個工作,我不得不使用非JRuby的紅寶石運行的Heroku時,因爲如果rvm使用jruby,heroku會崩潰。
爲了運行命令
mvn package
我不得不運行此:
bundle --gemfile=/home/justin/github/sinatra-jruby-heroku/Jemfile install temple
bundle --gemfile=/home/justin/github/sinatra-jruby-heroku/Jemfile update
我創建的應用程序:
heroku create jg1-sinatra --stack cedar
我把文件的Heroku,但當應用程序啓動時,它崩潰了。 ?:(
任何意見,我猜它不會很長的Heroku對本教程之前
日誌文件從Heroku的:
2011-11-21T08:30:40+00:00 heroku[slugc]: Slug compilation started
2011-11-21T08:31:17+00:00 heroku[api]: Deploy 3bccec5 by [email protected]
2011-11-21T08:31:17+00:00 heroku[api]: Release v7 created by [email protected]
2011-11-21T08:31:18+00:00 heroku[web.1]: State changed from crashed to created
2011-11-21T08:31:18+00:00 heroku[slugc]: Slug compilation finished
2011-11-21T08:31:20+00:00 heroku[web.1]: Starting process with command `sh script/jruby -S trinidad -p 17687`
2011-11-21T08:31:20+00:00 app[web.1]: Classpath is: :/app/etc:/.m2/repository/org/jruby/jruby-complete/1.6.3/jruby-complete-1.6.3.jar
2011-11-21T08:31:20+00:00 app[web.1]: Exception in thread "main" java.lang.NoClassDefFoundError: org/jruby/Main
2011-11-21T08:31:20+00:00 app[web.1]: Caused by: java.lang.ClassNotFoundException: org.jruby.Main
2011-11-21T08:31:20+00:00 app[web.1]: at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
2011-11-21T08:31:20+00:00 app[web.1]: at java.security.AccessController.doPrivileged(Native Method)
2011-11-21T08:31:20+00:00 app[web.1]: at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
2011-11-21T08:31:20+00:00 app[web.1]: at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
2011-11-21T08:31:20+00:00 app[web.1]: at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
2011-11-21T08:31:20+00:00 app[web.1]: at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
2011-11-21T08:31:20+00:00 app[web.1]: Could not find the main class: org.jruby.Main. Program will exit.
2011-11-21T08:31:20+00:00 heroku[web.1]: Process exited
2011-11-21T08:31:21+00:00 heroku[web.1]: State changed from starting to crashed
這就是說它找不到JRuby庫。你把它包含在你的包裏嗎?包是否在本地運行? –