If you have production servers running jruby/rails applications packaged as war files and dont actually have the full jruby installed to run your migrations, you can follow these steps. This will allow you to run db:migrate without a jruby installation on your java application servers
Assuming you are deploying your app called 'myapp' into tomcat5, you would have a warfile located in $CATALINA_HOME/webapps/myapp.war. if your war is not unwar'd you can run "jar xvf myapp.war" to generate the unwar'd directory of your app (which you will need)
# cd $CATALINA_HOME/webapps/YOURAPP/WEB-INF
# export GEM_HOME=$CATALINA_HOME/webapps/YOURAPP/WEB-INF/gems
# cp $YOUR_REPISTORY/Rakefile .
# mkdir -p db/migrate
# cp $YOUR_REPISITORY/db/migrate/* db/migrate
# java -jar lib/jars/jruby-complete-1.3.1.jar -S rake db:migrate
Thats it.
4 comments:
Thanks,
I'll probably be doing this pretty soon. Looks like we'll be moving an app to jRuby for warfile deployment next month.
Great Article
Java Online Training | Java EE course
Java Training in Chennai | J2EE Training in Chennai | java j2ee training institutes in chennai ~ Java Course in Chennai | Java Training Institutes in Chennai
Java 360 | IT Technical Articles |Java Training Institutes
e-commerce designing & services in affordable price!!! We are offering Apps for Android and IOS.......
Security testing is must. Everybody wants security at every level of his working. as explained above failures are happened but if we test time to time then it will improve. So it depend on us how much we are serious about this.
Intelligent Big Data Summarization for Rare Anomaly Detection Project For CSE
LBOA Location Based Secure Out sourced Aggregation in IoT Project For CSE
Modelling Cyber Attacks on Electricity Market Using Mathematical Programming With Equilibrium Constraints Project For CSE
Performance Evaluation and Analysis of IEC 62351 6 Probabilistic Signature Scheme for Securing GOOSE Messages Project For CSE
Poisson Reconstruction Based Fusion of Infrared and Visible Images via Saliency Detection Project For CSE
Secure Internet of Things (IoT) Based Smart World Critical Infrastructures Survey, Case Study and Research Opportunities Project For CSE
Post a Comment