Hacker News new | ask | show | jobs
Ask HN: Am I crazy to port my Rails app to PHP?
14 points by tapostrophemo 5971 days ago
(a.k.a. I'm cheap when it comes to hosting my hobby sites; I'd like to use Rails, but PHP on shared hosting is much cheaper and less work; suggestions?)

I've recently been working on a small, "hobby" web app - http://yoyocase.net. It's been a chance for me to scratch an itch (I want to show off my collection) as well as to learn Rails.

Finding hosting for my app has been challenging, though. I don't plan on monetizing this, so I really can't justify "expensive" web hosting. Nor do I want to go with a VPS - I don't want to play sysadmin in my spare time.

So, I've also been porting my code to PHP (not raw; CodeIgniter!), and plan to put it on my shared hosting account. Am I shooting myself in the foot?

Alternatively, do any of you know where I could find relatively cheap "shared" Rails hosting - a place where I wouldn't have to setup my own virtual server(s), keep all the software/packages up to date, etc.?

14 comments

About 18 months ago I came to the realization that Rails just wasn't required for the projects I was using.

I jumped on the Rails band wagon early and loved all the syntatic sugar that comes from Ruby, and I'd never really developed with an MVC pattern.

Like you, I gradually realized I was spending more time as a sysadmin or bashing my clients' commodity hosting into submission than actually building sites. I felt like I was cheating when I finally went back to PHP (CodeIgniter, also).

It wasn't til I rsync'd the PHP site I was working on to the prod server and saw it just work that I started feeling a bit better. Since then, I've been totally happy using simple but solid PHP frameworks.

So, I think you're on the right track. Admittedly, I'm a little out of date on the state of Rails deployment. But if you're productive in PHP, go for it.

What pattern do you develop with?
Not sure I understand the question... I use CodeIgniter whenever we're building a bespoke site. It uses a Model-View-Controller pattern, like Rails. Is that what you were asking?
I thought you comment said your don't use the MVC pattern.
I started hosting a project on heroku recently and it is simply fantastic. They offer a free hosting with 5 MB of DB storage and they just changed their pricing scheme and offer a plan with 20Gb of DB storage for only $15/month. Definitely worth checking out.

http://blog.heroku.com/archives/2010/1/21/pricing_changes_pa...

Second. I'm currently developing an app on Heroku and have found the infrastructure, hosting, and deployment workflow to be fantastic.

Give it a try!

Shameless plug: http://www.asmallorange.com/hosting/shared/ We host Rails with mod_rails/Passenger, so it'll run with minimal fuss. Works really great so far.

But honestly, it's whatever language works best for you. If you've got a good framework in front of it that's helping to keep you from making dumb mistakes, then that's all that really matters.

Looks interesting, and in the price range for a hobby site. Thanks!
As some commentars said, choose the language/framework that suits the problem.

That said, I have experienced and heard that the time made up by using Rails/Ruby, is much less than the time it takes to customize a Rails app to get it to do what you want. Especially when there's a lot of customization. What I like about PHP and frameworks like CodeIgnitor, is that customization is dead easy. You only write code for what you want to achieve, you don't need to work around the framework's preset functionality.

Short answer, it depends. A lot of customization, use PHP, something that fits with Ruby/Rails, use that.

You could try out webfaction.com; It offers a control panel where you can add as much apps as you want (including Django, RoR, static PHP, Worpress, etc.). The only 'real' limitation you have is memory usage. I have about 15 different apps running on the smallest webfaction acocunt and it works great; comes cheap too and you don't have to update it because it's a virtual server but it is maintained by webfaction (not your version of RoR, but the system itself). If you take the cheapest package the price is between $5.50 and $9.50 a month depending on how long you want to use it.
This doesn't address your original question, but when I visited your site, I immediately thought of my college years (early '90s) when my dormmates and I took up yo-yo-ing (sp?). We had a blast showing off our newly learned tricks. In fact, I hadn't thought much about that time until I saw your site.

Now that I have small children (3 and 2 yr/olds) it makes me want to take up the hobby again to show them the fun in it. So, think about ways that your site could grow into something that you hadn't originally thought of. Example: if you had instructions/videos demonstrating yo-yo tricks. A searchable, fun way for people to show off their hobby.

So, if you had the desire to monetize this one day, you may actually have some interest from people. This is just to say that maybe you shouldn't keep a tight lid on your ideas.

Good luck!

Oh, there are already many discussion/tutorial sites about yo-yoing. I don't intend to replace them, but to offer something they don't: a single place to coherently store pictures of, and more importantly, data about, your yoyo collection. Most of the message boards allow photo uploads, and you can always write descriptions in the posts, but that data is scattered.

I have thought some about montization (mostly in the context of "If this thing grows, how will I pay for hosting beyond my own personal/hobby threshold?"), and have two ideas:

1) fremium - subscriptions for the "serious" collector (more data fields, etc.)

2) ads from yoyo manufacturers/organizations (there aren't many, hence I don't think AdSense would really draw much revenue; plus, I actually have a few contacts at Duncan)

If I had to pick one of those, I'd rather pick #2 - I can't imagine this site, as I currently plan to build it, would add enough value to justify subscriptions.

Anyway, if you want to pick it up again, I recommend: - http://www.theyo.com/yoyo/ and http://www.theyostore.com/ - http://www.yo-yoing.com/news/ - http://www.yoyonation.com - http://yoyowiki.org

Definately try http://heroku.com. They have an excellent free plan that is perfect for smaller projects and development.

Also, if you use git, it's really easy to deploy an app by just pushing up to Heroku.

I have a shared plan on mediatemple. I am not a ruby man yet am 100% you can run rails. Then you can demonstrate both your ruby skills and your new found php skills.
More a note to myself than anything: check out http://news.ycombinator.com/item?id=1112543
First off, smart change! (see: http://www.canrailsscale.com).

Second, there is surely alot of rails-hosters out there, keep looking if you want to build your app with pure ror.But the beatuy of php is what you already have seen; it just works!

If it's a hobby app, no, you're not crazy, you're fine :)
> I don't want to play sysadmin in my spare time collaborate with someone who does.
check out hostingrails.com