Deploy rails site from local to justhost server - ruby-on-rails

I am new to rails and this question might be very basic. I learnt ruby on rails to create a small site which i have tested on herokuapp as well.
Now, I want to deploy it in the actual site which is hosted on justhost.
How should the application be deployed? Is there any way we could move the herokuapp directly to the server?
Thanks in advance.

Have you tried checking their help section? This tutorial from their website should show you everything you need: https://my.justhost.com/cgi/help/upload-site

Related

Rails newbie trying to understand why deployed Rails site has messed up formatting

As a way of learning how to develop with Rails, I have cloned a rails app here
https://github.com/boxerab/redis-io
and have deployed to Heroku:
https://gigacrunch.herokuapp.com/
The original site is hosted here: http://redis.io/
When comparing the two sites, the page formatting seems messed up
for my Heroku hosted site.
Being a beginner, I am not sure how to start investigating why the formatting would be so different if the Rails code is the same.
Any guidance here would be very much appreciated.
Thanks!
So it is clearly a problem with your assets, your css/js. If you use your devtools (chrome inspect element) on the page and look at the sources tab, it will show that the css file (http://polar-wave-5104.herokuapp.com/styles.css?1449091320 ) isn't loading. I don't know why, without more information, but that should be a place to start exploring.

Deploying Rails app to a VPS

I've been building my first site using Rails, and I want to get it live. Up to now I've only ever put a site live by just dropping all the files onto my VPS via FTP, and I know that's not how it works with a Rails app.
What I don't know is where to even begin with making sure Rails is installed on my VPS (it's Linux based, I bought a package from Webfusion), and then how to deploy it and get it all running properly. My VPS has Plesk 10 installed on it, and from what I've read I need to install Rails alongside Plesk? I may have the wrong end of the stick, so don't hold back if I'm saying stupid things.
I realise this is a really green question to ask, but I've scoured forums looking for a solution I can understand and come up with nothing, so hoping someone here can help.
Thanks in advance!
I've never used a control panel like Plesk but I do have a VPS at linode.com. To get my rails sites up and running I got help from a smashingmagazine blog post and pro railscast episode. The railscast episode is not free but it has great info.
There are a lot of details with each step of getting a rails web server running on a VPS so please look at the blog or railscast video. But a high level overview of the steps is:
install rvm
install ruby and ruby gems
install rails
install a rails web server (a common option is passenger and nginx)
install a database (postgres is a common option)
capistrano for deployment
I wrote an ebook an this topic. After explaining how to set up a server from scratch it focuses on how to deploy an application manually, helping you to understand how this process works under the hood (I left automation out intentionally).
It covers a nginx/Unicorn/MySQL/rbenv setup. If you think that's something for you, you can get it here (it's free for people on my mailing list).

Heroku App with a Wordpress Blog

I recently discovered that Heroku now allows PHP which means that a wordpress blog can be hosted on it. I also found this project template: https://github.com/mhoofman/wordpress-heroku
I have a ruby on rails app which is to be hosted on heroku with a domain www.mysite.com, and in that app, i need a way for www.mysite.com/blog to show the wordpress blog.
Can someone help me out, with details on how I can do this?
Whilst I've not used the new PHP platform I don't think what you're asking for is going to be possible.
When you deploy an application to Heroku it detects the type of application during the push process and sets up the application accordingly, Heroku use Apache to host PHP as you can see from the output in this post http://tjstein.com/2011/09/running-wordpress-on-heroku-and-amazon-rds/ - there's not been any mention of mixing platforms in a single application yet so would imagine that it's not supported.
The nearest you'd get is hosting your site and your blog in two seperate applications with the blog on blog.mysite.com and then put a redirect on www.mysite.com/blog to the blog.mysite.com url.
Im Still working on this
the closest to getting a solution is using the reverse proxy gem
see the answer here:
How can I use a subdirectory instead of a subdomain?

How do you remove a Ruby on Rails app from a production server?

I'd like to replace our existing Ruby on Rails application with a new version of the site in PHP, but I'm not sure how to remove the rails app from our shared VPS server.
Is there a way to delete the app via FTP or some way to remove it in Cpanel? The developers set it up to use a custom deployment script. Are there any typical uninstall scripts that might remove it?
Ideally, I'd like to avoid completely re-provisioning the server instance because I don't want to lose our blog database and email accounts.
Sorry for such a dumb noob question, but I'd really be grateful for some advice.
Thanks so much!
If its on linux, it should be at /var/www. Remove the database entries and put the PHP versions there too.

Deploying a RoR application in a separate folder

Let me start by saying I have never deployed a Rails app before.
I have a domain with a main site ran by PHP, let's call it http://www.example.com/.
I have began developing for Rails recently, and I'd like to host the new application I created on http://www.example.com/myapp while still keeping the original site intact.
The main site is hosted on Godaddy.com, but in my understanding they do not support rails well (my application is written in Rails 2.3.5). With that being said, I decided to host my rails app on Dreamhost.com.
So I have two questions: how do I deploy a rails app in a 'folder' on the main domain that actually links to dreamhost. Second, where do I get started with deploying the app?
Thank you!
Personally, I would setup a subdomain on dreamhost: http://myapp.example.com/
Then if you want people to be able to access it via http://www.example.com/myapp, put an .htaccess redirect on your godaddy site:
redirect 301 /myapp/ http://myapp.example.com/
Information on deploying Ruby on Rails on dreamhost's wiki:
http://wiki.dreamhost.com/index.php/Ruby_on_Rails

Resources