Heroku App with a Wordpress Blog - ruby-on-rails

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?

Related

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

Private pub on heroku

I am developing a chat application using rails 3.2.12 and a great gem called private pub, for which you can find a screencast here. It is built on top of faye and enables you to easily build real time chats by pushing messages.
Now, deploying it on heroku actually is not that simple with private pub. Apparently, you have to set up another app for the faye channel and then subscribe to that channel from your other app.
This is all very confusing. Neither private pub nor faye have anything about deployment on heroku in their documentation. I have found these two links:
Private Pub on Heroku | Rails 3
http://webprogramming29.wordpress.com/2013/02/15/setup-privatepub-or-faye-on-heroku/
However, I don't really understand them since they start at a more advanced level.
Has anyone of you ever deployed a private pub/faye app on heroku and can give a step by step guide? Thanks!
You can checkout my sample chat at github https://github.com/Hareramrai/batkaro.
You can also checkout private_pub server code at github https://github.com/Hareramrai/fayeserver .
If someone is looking for a more up to date answer, I just released a gem that enables real time behavior in a Rails app:
https://github.com/dchacke/entangled
It sounds like, from the articles that you linked, that you need to have two web processes running. One for the normal web server, and one for the Faye server.
It may be easier to have two Heroku apps rather than trying to get each running within the same app.

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

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