

Ask HN: I don't like Rails. Am I missing something? - mkrecny

I started working on a rails project for a TechStars team this week. It's my first time working with Rails. I haven't touched a CRUD app or a relational database for a while. Rails is full of conventions and tools that need to be rote learned. I realize that they're designed produce DRY codebases, and substantially reduce development time. I feel boxed in - the app is very unresponsive and at I'm writing essay-like queries. I miss node, redis and socket.io. Perhaps this is such a painful process because I'm a rails newb.
======
phren0logy
Rails is self-described as very "opinionated." In practice, I have found this
to mean that if something is difficult I'm not doing what Rails expects me to
do.

Sometimes that means I'm not using a mechanism in Rails that does exactly what
I want, thereby making life harder for myself. Sometimes that means that means
I want something different than the use-case Rails is optimized for. This is
still possible, but more complicated. In the balance, this has meant that easy
things are easy and hard things are hard.

If it is hard to do something easy, you are probably doing it wrong. Working
through some up-to-date Rails tutorials/guides will likely make your life much
easier. You still might not like it, but you'll be working with it instead of
against it.

~~~
mapster
well put. // fyi: you write prose like a programmer

~~~
phren0logy
That's because I'm writing this for programmers. FWIW, I'm not a programmer in
my day job.

~~~
mapster
It was a compliment. Carry on

~~~
phren0logy
I took it as one (and upvoted you). I'm not sure why your comment got so many
downvotes.

------
obiefernandez
Your description screams "I'm doing it wrong."

Simple advice since you need results: Have your bosses hire an experienced
Rails hacker for 1-2 days to come in and pair with you until you're over the
initial learning curve. Any of the large shops (including my old one,
Hashrocket) should provide this service for you if you insist on it. Won't
cost more than a couple thousand bucks at most, less if you find an
independent willing to be nice with you.

I wouldn't want to be a complete Rails noob right now -- the first steps up
that learning curve are brutal. However, once you have it down there's still
nothing else that comes close to the productivity you get.

In fact, I'm going to tweet a link to this in case people that follow me want
to volunteer to help you.

~~~
coreygrusden
I'm down cgrusden@divergentsoftware.com

------
pestaa
My experience with Rails is that if you stay on the path it marks for you, you
will really develop on rails. If you want to customize a little, it makes it
really painful.

If all you need is a CRUD app such as Basecamp and the other products from
37signals, Rails is a no-brainer and you'll be already half-way done.

If you need something more or something different, you better off looking deep
in the pool of plugins, because if they don't have the answers, you'll need
many hours to break the convention and tweak to your requirements.

The essay-like queries is a code smell, by the way, and to me it suggests
you're underutilizing Active Record scopes.

~~~
mkrecny
I agree. Based on conversations that I've had with rails gurus (I'm in a co-
work space with pivotal labs) the essay-like queries are definitely a code
smell. I think the guy who has laid the relational foundation for the app I'm
working on (and taught me all the rails I know to date) has done so in a non-
Railsy way.

~~~
pestaa
Yes, and it's not Rails only; every framework that uses Active Record (and
that covers the vast majority) requires this sort of approach.

"Skinny controller, fat model" is not as easy as it sounds.

------
nudge
You're not necessarily missing anything. I tried learning rails twice, and
neither time did it really click with me. Then I tried learning django and it
was a much better experience. I think it's just a matter of going with what
works for you. As long as there's an ecosystem around the framework / toolkit,
it doesn't matter what you're using.

------
clyfe
I am an experienced Rails developer and evangelist. I much (NB: opinion)
prefer Rails over everything else. If you would be so kind to share details or
code (if possible) I might point out what you are doing wrong, and why Rails
seems not to work for you.

------
glenjamin
Which version of rails are you using? Rails 3 is far far superior to rails 2.x
in my experience.

In addition, does the rails model fit your needs? Rails is there to be able to
roll out a clean, well structured, well tested CRUD application - it's
certainly not a "I win" button.

I'd wager that if you find you're using essay-like queries, either you've
missed a trick, or rails isn't a great fit for your application.

~~~
mkrecny
Rails 3. I think I've missed a trick.

------
chuhnk
I'm not a big fan of rails, initially that learning curve stopped me from
making progress with ruby. I went with sinatra instead. The simplicity of the
sinatra framework let me get right down to writing code. I learned alot of
ruby that way and getting to know the MVC model was much easier because I was
constructing pieces of it by hand, which some might deem wasteful but honestly
rails can be overkill for the things you may want to do.

Rails has been the web framework of choice for ruby for some years now and
will continue to be but thats not to say its the best tool for every job.
Sometimes you have to peel it all back. Thats where sinatra is brilliant.
Sinatra is becoming more mature and will continue to pick up steam.

~~~
adam-_-
There's also Padrino if you want something straddling the middle ground.

<http://padrinorb.com/>

------
maxbrown
Rather than make a new thread, I figured I'd ask here - for a newcomer to web
app development looking for a framework to learn, would you all suggest Rails
or Django or something else?

~~~
mr_november
[http://www.quora.com/Which-should-I-learn-Django-or-
Rails?q=...](http://www.quora.com/Which-should-I-learn-Django-or-
Rails?q=rails+or+)

Probably more applicable is Ruby or Python: [http://www.quora.com/If-I-only-
have-time-to-learn-Python-or-...](http://www.quora.com/If-I-only-have-time-to-
learn-Python-or-Ruby-which-should-I-choose-and-why)

~~~
mr_november
Am I missing something here? Why would this be worthy of a downvote?

Genuinely want to know so I don't make this 'mistake' again if it is in fact
bad form.

------
brianmario
"It's just ruby."- My favorite quote from one of the best Ruby programmers I
know, who at the time had very little to no experience with Rails.

I'd say any framework has a "steep" learning curve, after which things just
become easier and easier.

A problem I often see is that a lot of people try to learn Ruby through Rails;
And while that may work for some basics, a lot of things are still going to be
"magic" until you understand Ruby itself a little better.

------
eengstrom
(insert unrequested humor)

What? My mother learned rails (really, she's a web developer)!

Doesn't anyone develop on C any more?

