Deploying a RoR application in a separate folder - ruby-on-rails

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

Related

Hosting Ruby on Rails 000webhost

I am trying to host my website onto 000webhost with my rails app. In Filezilla(ftp client) I added the folder where my rails app is but it says it needs to have an index file in order to display. I have an index file inside my welcome controller folder, but how do I get my host website to access this. Anyone with experience on doing this and pointing me in the right direction would help a lot.
From what I can see, the host does not support Ruby, only PHP. To run your code Rails project find a host that has Ruby language support. Example: Heroku.

How to make a brand new WordPress blog a subdirectory of a Rails app hosted in heroku?

I currently have a Rails 4 app hosted on heroku under "my-app-domain.com". My ultimate goal is to put a WordPress blog hosted elsewhere (e.g Arvixe) under "my-domain.com/blog" for SEO purposes.
Some more details:
The blog will be brand new.
My Rails 4 app is hosted on heroku under "my-app-domain.com"
I've bought hosting in Arvixe for the blog and set up a dummy blog under "some-other-domain.com". I'm using Arvixe but as the blog will be brand new, I'm open to change the hosting service if needed to achieve this.
Questions:
How can I achieve this?
Do I need to set up my blog as a sub-domain "blog.my-app-domain.com" first and then use the rack-reverse-proxy gem to change it to "my-app-domain.com/blog"?
Do I need to purchase SSL in both Heroku and Arvixe for all my site to run under SSL?

Deploy rails site from local to justhost server

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

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?

Adding wordpress Blog in a Rails application

I have Rails application deployed on my home root directory of a domain and symlinked with my public_html/applicationname.com/. I wanted to install wordpress in applicationname.com/blog path. But rails ain`t allowing me to do so. I have tried a subdomain as well, but still, the routes are being handled by Rails.
What would be the best solution to deploy a blog along with Rails application ?
I can only think of .htaccess modification.
You should put your blog into the rails' public directory.That's the place for static files (and php ones are).
If you are deploying your rails app using Passenger then you can disable Passenger for a particular location. See section 5.8 of the documentation, which has an example for WordPress.
This article may be useful to anyone looking to solve this problem:
http://www.spotscore.com/blog/2009/11/22/how-to-host-wordpress-and-phusion-passenger-rails-app-on-the-same-domain/
Check the post :
http://joomlist.com/2011/10/php-in-subdirectory-of-rubyonrails/. it worked using passenger with apache.

Resources