How can i start a rails application on a tcserver? - ruby-on-rails

I have tried to run rails on mongrel, so i included gem 'mongrel' in the gemfile and started rails server mongrel, the server started fine. But i need to start rails on 'tcserver'. How can i do that?. rails server tcserver throws LoadError: no such file to load -- rack/handler/tcserver which is quite obvious. Please let me know how to start a rails application on a tcserver

Vfabric TC Server is an adaption of Apache Tomcat, and as such is a Java servlet container. It does not run Ruby-on-Rails as is.
You would need to use JRuby, and a tool such as Warbler, which packages Rails apps into WARs compatible with Tomcat.
This Is a good step-by-step for the process. (Replace Tomcat with TC server instance)

Related

Hosting a ruby site on localhost?

How to locally host this website package i got, I am PHP developer, and this package my client gave me contains of ruby gem files. Can anyone let me know step by step process for mac?
this is how the package looks
I tried installing gem bundle and packages, but not able to host it locally.
Here is a step by step tutorial to launch you first ruby on rails server.
https://www.tutorialspoint.com/ruby-on-rails/rails-installation.htm
When everything is set you launch your server with this command : rails server
Your server is now accessible here : http://localhost:3000
Step 2 from the below tutorial will get your site up and running on localhost.
https://www.theodinproject.com/courses/web-development-101/lessons/your-first-rails-application
First, you need to install Rails
gem install rails
Then navigate to your project folder and start your local server with
rails server

ubuntu 16.04 rails 5 passenger nginx, node.js don't work as javascript runtime

Hy there,
I'm working ours and don't find the solution.
When I'm starting rails 5 with puma on ubuntu 16.04 in development mode, everything works fine, node.js works as JavaScript runtime.
But when im starting the same application with nginx and passenger in production (precomiled with RAILS_ENV=production) I become the message:
"Message from application: There was an error while trying to load the gem 'uglifier'.
Gem Load Error is: Could not find a JavaScript runtime."
I know that I can use the gem 'therubyracer' but for some reasons I don't want.
Do somebody has an idea why node.js don't work with nginx and passenger.
Thanks ahead for every suggestion!

Running nginx in rails automatically

I am using rails 2.3.9, rubygems 1.8.24, ruby 1.9.3 and Windows 7 ultimate 64-bit
I just installed nginx as my web server through passenger. Now I want to run nginx as my default server such that when i run ruby script/server, it runs instead of the default WeBrick. Is there any way to do this? Thanks a million.
Nginx doesn't work the way you described. Once it is started, you won't need to run script/server, the rails app will be run at the same time when the Nginx/Apache started.
So, just deploy your rails app following the 'Passenger' manual( in development mode), and you will get your app always running.
so, as conclusion, we can tell that, when deploying a Rails app, Nginx and Apache is in the same group( work together with Passenger), and Mongrel/Webrick/Thin is another group(script/server approach).
You may want to take a look at Foreman.

How to deploy Rails project in Nginx server using passenger?

In my local, I am using werbrick application server for my localhost.
I have Ruby version 1.9.2 .and Rails version 3.1.
How to deploy On live,with Rails Project On Nginx Server?
And What will be the application server (like passenger module with apache) can be used with Nginx server for Rails 3.1 application?
This blog post should give you a good starting point. This one here goes a little deeper in detail. Note: I used these to get nginx running on my local development machine (OSX 10.7) and to host different rails apps locally without using Webrick. Probably there is more to take care of on a live / production system.

How to configure Ruby ob Rails for XAMP server?

I have installed Ruby On Rails Application on my harddrive, and i am using XAMPP server. But i was not able to configure it to use on XAMPP server, do Ruby on Rails run on XAMPP server or need some other server like webrick or lighttpd...??
It does not run on XAMPP. It can be integrated in Apache by using Phusion Passenger, but AFAIK it's not available for windows.
So, if you have windows, you'll have to use mongrel or webrick or any other win32-compatible server. I think mongrel is best for you.

Resources