Hosting a ruby site on localhost? - ruby-on-rails

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

Related

Locally works fine, on server -

When running my rails app locally, everything works fine. However, when deployed to a server, I get the following error:
ActionController::UnknownFormat (TasksController#index is missing a template for this request format and variant.
It's similar for all the pages. What could be the problem?
Rails version is 5.0.1. The deployed application is running on unicorn and nginx. I'm using slim templates. The same problem appears either if the views have .slim extension or .html.slim.
The slim gem might not be installed on your server. Try running bundle install on the command line in your app directory and then restarting your server.

Ruby on Rails: How to deploy an app on remote linux server

I have a working ruby on rails app in my local machine running on localhost(REST APi's). I want to deploy it on remote linux server.
I searched it over google, All I got was installing ruby, rails, nginux and others. It's really confusing. To make my app to work in rails environment in linux, is it really necessary to install the entire ruby and rails. Or, is there any binary executable available where we can use it without installing.
What is minimum required software to install or configuration needed to be set to make my app work in production environment?
(For Example, when I deploy nodejs app, All I need is to put the linux nodejs binaries in server without the need for installing the entire nodejs software)
Any help is appreciated!
The process of setting up your production server will be pretty much the same as with setting up your development machine in terms of installing Ruby and its dependencies. There are no binaries that you can just copy over. In addition to that you'll have to install and set up a web server like Apache or nginx.
I recommend this guide by Digital Ocean. It goes through everything from installing ruby, to setting up the database, to configuring the web server.
They have a couple more (here and here), which seem to be very similar, using different application and web servers, but I haven't read them.
You need to do the following:
1) Ensure that you have an installation of the Ruby language, either via your Linux package manager or with rvm or the like. I recommend it be a recent version (2.2+).
2) Copy over your Rails source tree.
3) gem install bundle
4) bundle install (in the project root directory)

Is Rails framework needed to deploy website written in Rails on server?

Do I have to install rails framework to deploy a website written in rails on server ?
I am at online website written in rails and I don't know how this website was deployed. When I write rails -v it tells me rails isn't installed. I also tried to run rvm -v and rbenv -v but I get the same response, not installed
I think rvm is not installed properly run this command
source /home/.....(username)/.rvm/scripts/rvm

How to use awrapbootstrap (made with twitter bootstrap) themes with Middleman

The website wrapbootstrap.com sells Twitter Bootstrap themes. The theme I purchased was built on Middleman and my hope was to get it live and running in Middleman before trying to get it running on rails. I contacted the seller multiple times through the site without an answer so I am turning to SO for help.
Using a Vagrant VM, I am able to get Middleman up and running with the "MIDDLEMAN IS WATCHING" base page when I go to localhost:8886 (My vagrantfile is set up to redirect port 8000 to 8886 on my local host).
With Middleman working, I move on to getting the wrapbootstrap theme up and running:
Copy the wrapboostrap files to a new project folder (file are temporarily here: https://github.com/badhashsolution/Wrapboostrap_question ).
$ rvm gemset create wrap_project
$ rvm gemset use wrap_project
$ bundle install
$ bundle exec middleman server --port=8000 (my vagrant file is set up to use port 8000 and redirect it to localhost:8886)
When I go to localhost:8886, which worked with a base install of middleman, I now have the message: "File Not Found
/pages/dashboard/dashboard.html"
Some of research I did on the web suggested that this would be solved by deleting the gemlock file and rerunning bundle install, but this does not fix the issue
Also, as you can see from the files on github, there is a pages/dashboard/dashboard.html file
I fixed this in a couple ways.
It is the Core Admin theme from Wrapbootstrap and it comes with a
Bootstrap 3.0 and a Bootstrap 2.0 version.
I switched to the Bootstrap 2.0 version then deleted the gemlock
file and re-ran bundle install
After this the file worked just fine on "localhost:8886/pages/dashboard/dashboard.html" Note that my Vagrant VM is pointing to port 8886

How can i start a rails application on a tcserver?

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)

Resources