I am using:
Ubuntu 12.04
JRuby 1.7.2
Rails 3.2.12
Tomcat 7.0.26
I have successfully run my application using
rails server
command and work with my demo application on 127.0.0.1:3000 .
I have installed warble gem and using
warble
in my application directory generates .war file which I have deployed. Unfortunately, when I try to reach my application using 127.0.0.1:8080/depot/ I get the following error:
org.jruby.exceptions.RaiseException: (NameError) cannot load Java
class com.ibm.db2.jcc.DB2Driver at
org.jruby.javasupport.JavaClass.for_name(org/jruby/javasupport/JavaClass.java:1227)
...................
So, I believe the application is not able to find the specified driver but how I am supposed to deploy it?
Also, using Tomcat in this way, will be my application visible from remote PCs?
Have you installed the db2 database drivers into the Tomcat shared resources folder? Or are they deployed as part of the .war ?
The simple answer is no. 127.0.0.1 always routes to localhost; You would need to define a new virtualhost in the TomCat configuration in order to expose your application to the outside world.
Related
I want to get an interactive rails console on a deployed JRuby on Rails app on Tomcat deployed as a war file.
its a bit tricky but possible - not going into details but here's the setup:
setup pry-remote on server to wait for connections (on localhost)
spawn an embed JRuby container (possible from the extracted .war content)
the code to be executed there should simply connect via socket
Hi I am new to ruby on rails and I want to deploy my rails app using web server apache2 and application server tomcat and jruby.I have installed tomcat 8.0.36 and apache2.My application runs on tomcat server IP_ADDRESS:8080.
apache2 folders:
apache2.conf conf-enabled magic mods-enabled sites-available
conf-available envvars mods-available ports.conf sites-enabled
Please suggest me how to connect both these server and deploy.If my idea is wrong then suggest me what are the best way to deploy rails app.
You could deploy using this link
https://www.digitalocean.com/community/tutorials/how-to-deploy-a-rails-app-with-passenger-and-apache-on-ubuntu-14-04
I installed Ubuntu, GlassFish web server, installed JRuby on Rails using GlassFish's admin tools, deployed my application from .war archive. The problem is only - when I attempt to run this web application nothing happens. GlassFish isn't listening on port 8080 as promised. The GlassFish administration web console listens on port 4848 and works fine. What to do to pair GlassFish and JRuby on Rails the correct way, remembering that it isn't a separate JRuby installation?
Update: it seems that this problem lies somewhere around access rights because I can deploy an application through
sudo ./asadmin deploy
but can not do the same through web console. The output is as if the application has been deployed, without any error messages (web interface shows the presence of application, domain folder contains my application's file/folder structure), but something in server's internals isn't bound to application.
I didn't think much and applied quick and dirty solution: set "777" access rights to /home/glassfish and all its contents. It helped.
I'm very new to Ruby environment ..
I want to run my Ruby on rails Application in apache in xampp on windows xp rather than WeBrick server which is in-built for ruby on rails...
I tried it by adding Virtual host in apache- http.conf file
When i run my application i'm able to see "Welcome Abroad"....
But when i click on "About your application’s environment"
it was showing error like the following
Object not found!
The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.
If you think this is a server error, please contact the webmaster.
Error 404
localhost
9/9/2011 10:47:31 AM
Apache/2.2.17 (Win32) mod_ssl/2.2.17 OpenSSL/0.9.8o PHP/5.3.4 mod_perl/2.0.4 Perl/v5.10.1
To deploy your app with apache you need to use phusion passenger http://www.modrails.com
There are plenty of how-to's around the web and the documentation is good enough to get the service running.
This means your Ruby on Rails server is NOT running.
You need to run your server first.
I made a batch file, start-server.bat which contains
d:
cd "D:\Ruby\Web\rails1"
"C:\RailsInstaller\Ruby1.9.3\bin\ruby.exe" script\rails server
then check the PORT number of the server that is running,
So since the port on the screenshot says 10524, you can run it on
http://localhost:10524/
I am developing a Rails 3 application and I have installed Capistrano on the client side and Passenger with Apache 2 on the server side.
I make a deployment and the files are sent to a folder called u/apps/.
But when I visit the IP address I am currently using I only get to an empty folder, how do I configure Apache to look for my app in the current folder? So that I only need to visit my IP/domain to see my app?
I have done this using Rails 2.x but I think for Rails 3 also pretty much the same thing. For this you need to use Passenger and then configure Apache.
Following are some useful resources
http://www.modrails.com/install.html
http://railscasts.com/episodes/122-passenger-in-development
If you browse to your URL and you see an apache files/folders list that means that passenger is not triggered for that location...
Test your server environment by running a mongrel/thin in your application folder and see that your application runs correctly. After that, look at your Apache configuration (see Passenger docs).