Apache using JRuby - jrubyonrails

I am currently using application which is developed using JRuby on Rails. I have created application which heavily depends on JRuby internals. Now I am looking to host the application in dedicated server using Windows platform. Can anyone tell how we can host the application using JRuby on rails. There is a possiblity of doing it ruby on rails. We can use it Apache/IIS7. But there are no specific details given regarding how to do develop in JRuby on rails Windows based platform using Apache/IIS7. Can anyone help me how to host JRuby on rails in dedicated server ?

You can use Trinidad to deploy a Jruby on Rails application. Trinidad uses Apache tomcat as it's application server and Tomcat is embedded in the Jruby gem so you don't need to host/administer your own Tomcat instance outside of the application.
https://github.com/trinidad/trinidad
simplest application (from command line at the root of your rails app):
jruby -S gem install trinidad
jruby -S trinidad

Trinidad is a fine solution, but I've found that if you're hosting on the windows platform a better solution might be war file deployment. Use the Warbler gem https://github.com/jruby/warbler to create a simple war file which is then deployed to a tomcat server. This seems to work better for the windows ecosystem -- especially if there is an existing tomcat server or argumentative Ops staff involved.
For super ease of use, Trinidad.
For existing Windows world and Administrators, tomcat and war file.

Related

Can we deploy an asp.net mvc 4 app to docker with windows container?

All the demo I saw lately are oriented Asp.net core (I am not sure how it's stable and functional, as it didn't contain all asp.net features), as Windows server 2016 support containers (and docker), should we be able to deploy an asp.net mvc 4.0 app ?
Yes.
You can use microsoft/windowsservercore or microsoft/iis as a base image, install full ASP.NET and run your 'legacy' .NET apps in containers on Windows. You can do it now with Windows 10 and Server 2016 TP5, but the RTM (expected next week at Ignite) should be more stable.
I've shown this by Dockerizing the old Nerd Dinner showcase app. You end up with a Docker image that's 3GB so you won't get all the benefits of having a small, efficient image - but you can run your app in a container, and that's a starting point for breaking down monoliths.
For reference, this is what the Dockerfile for a compiled ASP.NET app looks like:
FROM microsoft/iis
RUN ["powershell.exe", "Install-WindowsFeature NET-Framework-45-ASPNET"]
RUN ["powershell.exe", "Install-WindowsFeature Web-Asp-Net45"]
ADD web-app/ c:\\web-app
EXPOSE 8081
RUN powershell New-Website -Name 'web-app' -Port 8081 -PhysicalPath 'c:\web-app' -ApplicationPool '.NET v4.5'
ENTRYPOINT powershell

How to use my own java in websphere 8.5.

My client refused to give access to WAS inbuilt JAVA and so I am not able to install my application. I have my own java installed at home/code/java. I set my JAVA_HOME as home/code/java but still when I am running the installation script in UNIX it is referring the same default JAVA_HOME under the Websphere.
Please suggest in which script I need to make the changes.
You can only use the Java that is shipped with the WebSphere Application Server full profile. It is not supported to use your own version of Java.
The WebSphere Application Server Liberty profile does support running with your own version of Java. See the Minimum supported Java levels section in the Knowledge Center.

Calling methods in jar from a rails application

I am creating a web application in ruby-on-rails 4. There are some jar files of another application with which i have to integrate my application. I have to call some methods of the class files contained in jars.
Please let me know how can i call methods in jar files from my RoR application?
Any pointers/links will help.
Thanks.
You might want to check out jruby. It's an implementation of ruby that runs in a JVM and has access to everything that a java app would. Here are instructions on using jars and java classes with jruby. You can still use rails with jruby.
Heroku has a migration guide that details moving from ruby on rails to jruby on rails that might help you out, as not all gems are compatible with jruby.

ASP.NET on a linux webserver

Can I host a asp.net application on a linux based webserver?
Do they allow .net framework to be installed on linux?
Mono might work for you. It's an open source implementation of .NET that runs on Linux. It requires installation.
You can test your ASP.NET application with MOMA (Mono Migration Analyzer) first to see if it will work.
Take a look a Mono, specifically and it's ASP.NET implementation.
Check out the mono project:
http://mono-project.com/Main_Page
It's not 1:1 to the .net framework, but it's as good as you're going to get on linux in terms of .net.
Although there is Mono project - an implementation of .NET framework for Linux OS, I'd suggest you to use Windows server to host your web applications, since Mono doesn't provide all .NET functionality.
Yes that is possible, if you have a VPS/VPC server.
In shared hosting server you coudl go for Windows/Plesk, as they have pre-installed ASP.net.
In shared hosting Linux, you may not get root access to install ASP.net, please confirm over the specification from your hosting provider.
If you have a Linux server make sure that you " root access " to install the progamming language.

What do I need to install to compile Silverlight 2.0 applications on my build server

What's the minimum that I need to have installed on my Build Server (in addition to the standard .Net 3.5 stuff) to allow it to compile Silverlight 2.0 applications?
I have a Silverlight application that seems to be building correctly, but is not playing nicely with a related Web Application project - see this related question that I asked earlier: Silverlight xap file not being copied to ClientBin on Build Server
AFAIK you need Microsoft Silverlight 2 SDK to install on the build server.
HTH
Your build server should be pretty much an exact replication of your development machine as far as plug-ins, assemblies, run-times, SDK's etc.
You build server will be building your app via MSBuild.
In your particular case I suspect that you need to install the Silverlight Toolkit. This will give you the SL development runtime and the appropriate project build requisites for your XAP files to build and be deployed properly.

Resources