6 ms·
Ask HN: Should I or Why should I bother continuing with rails
Over the past 3 weeks I've been trying to learn rails. I've been programming in PHP for about 4 years, and decided to expand my horizons and use the language everybody is talking about.
The things I like about RoR is that due to the structure and expectations of rails, I suspect it is much quicker to get new people up to speed on a project because theoretically, the structure is already laid out.
I also in theory like the way it handles migrations, though I haven't actually used it in a production environment yet.
The things I'm HATING is that every little bit of code I write doesn't work!
I'm moving like molasses here, and have very little to show for nearly 3 weeks of messing with this language.
As you can see from my stackoverflow account http://stackoverflow.com/users/48067/pedalpete, if you care to look, I'm spending hours doing minor little things like making a link to delete a database entry and it just doesn't work!
Has anybody been in the same situation? I'm following guides, watching the railscasts, etc. etc. but I'm absolutely not getting it and extremely frustrated.
Maybe I just don't remember being this frustrated with PHP, but I seem to recall with PHP i was getting into some much deeper stuff when I was still learning and I don't remember it being nearly this painful.
Has anybody else had the same experience?
Is there some magic bullet that is all of a sudden going to make this better?
I can't believe that all the hype around RoR is really applicable to everybody but me, so there must be something I'm missing.
- jasonshen 16y agoWhat version of Rails and Ruby are you running? A lot of tutorials, guides, fixes, etc are based on older versions (not 3.0 and 1.9.2). I've been trying to do some stuff with Rails (granted without 4 years of PHP) and it's been slow going as well. Everything is just a little less documented and a bunch plugins, bug fixes, etc just aren't up-to-date yet.
- pedalpete 16y agoI am running 3.0 and 1.9.2. I realize that I am ahead of the curve on much of the tutorials, but should that really be causing this kind of complete breakdown. There is backward compatibility, and I am learning the rails3 way as much as possible, looking to the rails3 documentation rather than the older stuff.
- lfborjas 16y agoI'm in your exact same situation, man; I've developed in php , python (with django and webapp) and little webapps in ruby with sinatra. I begun with rails 3 (and rails in general) two weeks ago, and am feelin' the progress rather slow. I think some of it is due to the usual learning curve and the kinda hard to find documentation and broken plugins. I'm starting to get it, but I'm also being tempted by the fact that I read the documentation for padrino (www.padrinorb.com) last night and felt that I understood more than what I have gotten from rails 3 in two weeks. So, you're not alone, and, if it weren't for the fact that padrino is really new and doesn't have as large a community as rails, I would have made the switch without hesitation right away. Still considering it, though.
- pedalpete 16y agoI hadn't heard of padrino, and hadn't looked closely at Sinatra which i thought was a ruby plug-in rather than a different Ruby web framework. Originally I was working with a whole bunch of Gems to learn mongo and do some more interesting stuff, but with all the gem issues, I decided to just stick to the basics and am building what should be a fairly simple app.
- lfborjas 16y agooh, well, that's swell; I finally sticked to rails (finally got the knack of it) and am using mongoid for mongodb interaction, if you're interested, here's a fine example of mongodb in a simple working rails 3 app: http://github.com/fortuity/rails3-mongoid-devise http://github.com/fortuity/rails3-mongoid-devise
- thinkalone 16y agoAre you learning Ruby at the same time, or do you have prior experience with the language aside from RoR? Ruby "feels" quite different from PHP, so if you are tackling it in addition to learning Rails, possibly it would be better to stick to Ruby tutorials and scripts that run locally, then stepping up to learning Rails. Also, if it's Rails that's giving you trouble, have you considered starting with a smaller framework like Camping or Sinatra? That feeling of none of your code working can be frustrating, but maybe it's because you missed some of the beginning steps with Ruby and it's making things more difficult than they should be!
- LeBlanc 16y agoI also recommend learning Ruby before Rails. I tried it the other way and was often very confused as to why something would work or not because Ruby and Rails both do a lot of things that seem like magic to a new user. Plus, hacking in Ruby can be a lot of fun. There are a lot of really neat tricks you can use to do really cool things.
- pedalpete 16y agoWhen I told a friend I was giving up on Rails and explained why, he also recommended learning Ruby alone. I didn't understand why until he explained " the caller doesn't have to use curly braces to signify a hash if the hash is the last argument in the call. For methods that only take a single hash as an argument, this is pretty easy to understand. " This resolved a huge issue I was having with my Ruby, but I find this to be a really poor way to write a language. Maybe it will just take more getting used to. We hear people say that English is so difficult to learn because of these 'rules and exceptions', so maybe I just need to get that mentality and realize that just because something worked in one instance, it won't in another. I will spend more time focusing on learning Ruby. i was always thinking the problems I was having was due to rails.
- devmonk 16y agoInstead of trying to do what you want to do, even if it is simple and you know what you want to do should be easily doable, try some tutorials. Note that if you are using Rails 3, most of the tutorials out there are for Rails 2. This is going to be a rough next year and a half or so. For Rails 3, check this out if you haven't already. Personally I'm not into watching videos of someone else coding, but maybe you are: http://railscasts.com/ http://railscasts.com/ transcriptions here: http://asciicasts.com/ http://asciicasts.com/ Here comes the frustrating part. Unlike PhP, Java, etc. where just looking up stuff online is enough, unless you participate in the various local Ruby get-togethers or have some others nearby that do, you're likely to find yourself in the dark more than you're used to being. I'm somewhat of an introvert, and have a family where I can't be going to these things nor do I want to, but not going to the meetups definitely hurts it seems. Maybe I've bought into the hype too much about how much the meetups help though, and I've heard from someone that some meetups are more hype than help, so if you don't like one group, try another. Basically, here are the pain points I can think of: If you relied on it in the past, lack of static typing hurts in the beginning, but not so much after a year or so with the exception of lack of good method/etc. completion due to the dynamic nature of Ruby. Having wierd bugs because the gem/plugin you are using is incompatible with the version of Rails, etc. is no fun. Read the docs associated with the gem/plugin. Submit a ticket/contact the developer(s) some other way to find out what they use. This doesn't bite as much as you'd think. Trying to track down what in the heck is going on in Rails, Active Record, etc. can be a pain when something isn't working. I've not gotten good enough to feel totally comfortable with this, but I know people after working several years with it are more at home with this. Upgrading Rails can suck. You'll read suggestions that say if you don't write test first, you'll not be able to handle bugs/issues that well. That is probably true, however the team I'm on doesn't pay attention to testing as much as they should, and we get by mostly ok (some tough issues here and there). Overall, Rails is ok, and Ruby is pretty cool. Also check out Sinatra, etc. Maybe you don't need Rails for what you are doing.
- pedalpete 16y agoI did a 'build a twitter clone in rails' tutorial rote, but I find I learn much better if I put my own spin on the tutorials as it forces you to look deeper and understand what you're doing rather than just following along and copying code. I would suggest nobody 'needs' rails, i can get along very well with php, but I thought I'd see what all the hype was about. I suspect I'll go back to my php land. Unfortunately feeling a bit defeated.
- sublemonic 16y agoI'm also new to web development (I have no where near 4 years of experience). Do you understand object oriented programming enough to explain it to a programming newbie? If not, you need to take a class. No amount of Railscasts/Peepcode vids/Rails books will teach you OOP, and yet Ruby and Rails require a working knowledge of it. I know PHP is an OOP lang, but you may not have used it that way.