ã¡ãã£ã¨åã« JRuby 9.0.0.0 ããªãªã¼ã¹ããã¦ãã¾ãããRuby 2.2 ã¨ã®äºææ§ãããããã§ãã
JRuby ã使ã㨠Azure Web Apps ã§ã Ruby on Rails ã¢ããªã CRuby ãªç°å¢ãããå®å®ãã¦åãããã¨ãã§ããã®ã§ãããã¾ã§ã«ãä½åãæ±ã£ã¦ãã¾ããã
ããã¦å¶ç¶ã«ã Web Apps ããã¼ã¿ã«å¨ããã¢ãããã¼ããã㦠Java 8 ãç°¡åã«ä½¿ããã¨ãã§ããããã«ãªã£ãã®ã§ãåã®ããã« JRuby 9.0.0.0 㨠Java 8 ã®çµã¿åããã Web Apps ã§åããã¦ã¿ã¾ãã
æè¿ã®ã¢ãããã¼ãã§ãã¼ã¿ã«ãã Java ã®ãã¼ã¸ã§ã³ã¨ Web ã³ã³ããã®ç¨®é¡ãè¨å®å¯è½ã«ãªãã¾ããã
ããã¾ã§ã¯ JAVA_HOME
ãèªåã§ãªã¼ãã¼ã©ã¤ãããå¿
è¦ãããã¾ããããããããã¯ãã¼ã¿ã«ããå¿
è¦ãª Java ãã¼ã¸ã§ã³ã«åãæ¿ããã ãã§ãã
Web ã³ã³ãããå¿ ãæå®ããªãã¨ãããªãã®ã¯ãã¾ãã¡ãªã®ã§ã使ããªãè¨å®ã欲ããã§ããã
Web Apps ã§åããããã®ãµã³ãã«ã以åã« GitHub ã§å ¬éãã¾ããã®ã§ãä»åã¯ãããä¿®æ£ã㦠JRuby 9.0.0.0 ã¸ã®å¯¾å¿ãè¡ãã¾ãããJava 8 ã¯ãã¼ã¿ã«ããã®è¨å®ã ãã§åé¡ããã¾ããã
主ãªä¿®æ£ç¹ã¨ãã¦ã¯ JRuby ã®ãã¼ã¸ã§ã³æå®ã¨ãã¹ãä¿®æ£ãããããã§ãã
以å㯠bundle exec
ã使ã£ã¦å®è¡ãã¦ããã®ã§ãããJRuby ã® Wiki ãè¦ã¦ãã㨠bundle exec ã¨åããã¨ãè¡ã£ã¦ããã -G ãªãã·ã§ã³ãç¥ã£ãã®ã§ããã¡ãã使ãããã« Procfile ãä¿®æ£ãã¾ããã
bundle exec
Improving startup time · jruby/jruby Wiki · GitHub
Bundler's "exec" command causes a second JRuby instance to be launched for the sole purpose of booting only your Gemfile gems. You can avoid the second process by passing -G to JRuby, which will do the Bundler pre-booting before starting JRuby and loading RubyGems.
PATH ã®åé¡ãªã®ã puma ãç¸å¯¾ãã¹ã§æå®ããå¿ è¦ããã£ãã®ã§ããã®å¯¾å¿ã ãè¡ãã¾ããã
jruby.exe -G vendor/bundle/bin/puma --env development -p %PORT%
ããã¾ã§ã¯ bundle exec ã®å®è¡ã®ããã« JRuby ãèµ·åããå¾ãããã« JRuby ãèµ·åãããå½¢ã ã£ãããèµ·åããã©ã¼ãã³ã¹ã¨ã¡ã¢ãªæ¶è²»ãæ¿ããã£ãã®ã§ãããããã§å¤å°æ¹åã§ãã¾ããã
ãã¯ãååèµ·åã«ã¯æéããããã¾ãããå®éã«ãã©ã¦ã¶ã§ã¢ã¯ã»ã¹ãã㨠Rails ã®ãã¤ãã®ãã¼ã¸ã表示ããã¾ããã¡ãã㨠JRuby ä¸ã§ Ruby on Rails ãåä½ãããã¨ã確èªã§ãã¾ããã
ç¸å¤ãããã®è©±ã«ãªãã¾ãããJRuby ãã¤ã³ã¹ãã¼ã«ããããã»ã¹ã«å°å³ã«æéããããã®ã§ãããªã¤ã³ã¹ãã¼ã«ãããããã«ãªãã°ãããªã¨æãã¾ãã
å®è¡å¾ã« Process Explorer ãè¦ã¦ã¿ãã¨ãJRuby ã 1 ã¤ã ãåãã¦ãããã¨ã確èªã§ãã¾ãã
JRuby ã 1 ã¤ã ãèµ·åããããã«ãªã£ãã®ã§ãèµ·åæéã 20 ç§ã»ã©ç縮ã§ããã¨æãã¾ãã
ããªã JRuby 9.0.0.0 ã§äºææ§ãæ¹åãããããããWeb Apps ä¸ã§ãå®ç¨åºæ¥ãããªæ°ããã¦ãã¾ãã