Giving up on Rails: programmer un-happiness

I've just spend the better part of this 60 hour week (yes, at my job: risking my otherwise productive neck) just trying to get rails up and running in a way that is as "fast" and "easy" as all the hype suggests. So hear me out for a bit on my reasons for why I'm giving up. Perhaps somebody out there will recognize this as a desperate cry for help and save me from committing platform suicide.

The reasons:

1) I don't know Ruby 2) A bad experience with ruby 1.8.6 p 230 (STILL!? the most prominent link on the rails download page) 3) Unstable documentation     a) old 1.x tutorials that don't work with the recent 2.x downloads     b) not as much of a community/following in my areas (linux, postgres, academia)     c) language barriers to entry (despite the appeal of ruby's and rails' internationality)     d) the fact that the current best documentation is a soon-to- obsolete book (and $54 at that!)          Agile Web Development with Rails 7 by Sam Ruby     e) the api documentation http://api.rubyonrails.org/ is overwhelming and ugly     f) contentious, contradicting and out of date wiki-ing 4) Auto renaming: I thought it was cool (and I obliged) until rails renamed my "people" table to "peoples" 5) Too much abstraction? Call me old fashioned but I'm kind of missing get and post and html forms 6) Difficult integration with existing technologies.     b) apache: a million steps (including fastCGI) and it still doesn't work. (I'd been using WEBRick)     c) can't use an existing schema or existing database to build rails classes & forms (am I misunderstanding? I thought this is why rails was supposed to be so great? Is this not possible?)     d) foreign keys (and the associated one to many, many to many relationships) are not created or represented automatically in the database or web forms when using script/generate scaffold table1 var1:string var2:integer table2_id:integer

This last one is the big one (the rest I'm willing to forgive for such an otherwise apparently elegant language and environment). If i can't easily see a compelling demonstration or working code snippet that proves this very basic relationship functionality is even possible, I'm not going to invest time mucking around in classes trying to learn ruby.

Why not use the information present in a variable name like table2_id? I guess I got the (incorrect?) impression that "if i could only rename my variables differently rails would understand and create these relationships for me! Including the corresponding necessary drop-down/select-box functionality in the views/layouts.

If someone can get me going on this last bit I just might give it another try. If not, Its back to non-object oriented PHP and web forms for me.

Thanks for letting me rant,

Dave

I've just spend the better part of this 60 hour week (yes, at my job: risking my otherwise productive neck) just trying to get rails up and running in a way that is as "fast" and "easy" as all the hype suggests. So hear me out for a bit on my reasons for why I'm giving up. Perhaps somebody out there will recognize this as a desperate cry for help and save me from committing platform suicide.

The reasons:

1) I don't know Ruby 2) A bad experience with ruby 1.8.6 p 230 (STILL!? the most prominent link on the rails download page)

That is a bit of a shambles. Rails doesn't control ruby though.

3) Unstable documentation    a) old 1.x tutorials that don't work with the recent 2.x downloads    b) not as much of a community/following in my areas (linux, postgres, academia)    c) language barriers to entry (despite the appeal of ruby's and rails' internationality)    d) the fact that the current best documentation is a soon-to- obsolete book (and $54 at that!)         Agile Web Development with Rails 7 by Sam Ruby    e) the api documentation http://api.rubyonrails.org/ is overwhelming and ugly    f) contentious, contradicting and out of date wiki-ing 4) Auto renaming: I thought it was cool (and I obliged) until rails renamed my "people" table to "peoples"

rails should never do that, and it should never rename a table for you.

5) Too much abstraction? Call me old fashioned but I'm kind of missing get and post and html forms 6) Difficult integration with existing technologies.    b) apache: a million steps (including fastCGI) and it still doesn't work. (I'd been using WEBRick)

fastcgi = bleurgh mod_rails is proving increasingly popular, and most other people are
proxying (apache or nginx) to clusters of mongrels.

   c) can't use an existing schema or existing database to build rails classes & forms (am I misunderstanding? I thought this is why rails was supposed to be so great? Is this not possible?)

You certainly can do this (although if your schema does not match
rails' assumptions & conventions then you'll need to give rails some
points in the right direction, eg tell it what the table name for a
class it etc...)

   d) foreign keys (and the associated one to many, many to many relationships) are not created or represented automatically in the database or web forms when using script/generate scaffold table1 var1:string var2:integer table2_id:integer

This last one is the big one (the rest I'm willing to forgive for such an otherwise apparently elegant language and environment). If i can't easily see a compelling demonstration or working code snippet that proves this very basic relationship functionality is even possible, I'm not going to invest time mucking around in classes trying to learn ruby.

Why not use the information present in a variable name like table2_id? I guess I got the (incorrect?) impression that "if i could only rename my variables differently rails would understand and create these relationships for me! Including the corresponding necessary drop-down/select-box functionality in the views/layouts.

It's not quite free. assuming you have foo_id in your bars table then

class Foo < ActiveRecord::Base    has_many :bars end

class Foo < ActiveRecord::Base    belongs_to :bar end

I'm not sure where you got the impression that you could skip this. Fred

Hi --

I've just spend the better part of this 60 hour week (yes, at my job: risking my otherwise productive neck) just trying to get rails up and running in a way that is as "fast" and "easy" as all the hype suggests. So hear me out for a bit on my reasons for why I'm giving up. Perhaps somebody out there will recognize this as a desperate cry for help and save me from committing platform suicide.

The reasons:

1) I don't know Ruby

That is a bit of a show-stopper. Of course, I'd encourage you to learn Ruby, which is a great language.

5) Too much abstraction? Call me old fashioned but I'm kind of missing get and post and html forms

It can be a bit too magic, for some people's definitions of "too" (including mine). Usually you can be more verbose or explicit with no harm done. For example, I like to put empty actions in my controllers, even though technically I don't have to if the views are present.

   c) can't use an existing schema or existing database to build rails classes & forms (am I misunderstanding? I thought this is why rails was supposed to be so great? Is this not possible?)

It's possible, but it's not why Rails was supposed to be so great. It's always been clear that Rails is at its best (mainly meaning ease for developers, but also meaning avoidance of some things it doesn't support, like composite primary keys) when the database is designed from the beginning to be ActiveRecord-friendly.

   d) foreign keys (and the associated one to many, many to many relationships) are not created or represented automatically in the database or web forms when using script/generate scaffold table1 var1:string var2:integer table2_id:integer

You're using the scaffolding? No wonder you're frustrated :slight_smile:

This last one is the big one (the rest I'm willing to forgive for such an otherwise apparently elegant language and environment). If i can't easily see a compelling demonstration or working code snippet that proves this very basic relationship functionality is even possible, I'm not going to invest time mucking around in classes trying to learn ruby.

Why not use the information present in a variable name like table2_id? I guess I got the (incorrect?) impression that "if i could only rename my variables differently rails would understand and create these relationships for me! Including the corresponding necessary drop-down/select-box functionality in the views/layouts.

As Fred said, you have to declare the associations in the model files and then back up those declarations, so to speak, with the correct foreign key wiring in the database. It's not possible for ActiveRecord to infer them, because your table will have table2_id for both a has_one and a has_many association, and any of the more powerful/non-default association features definitely can't be inferred.

I hope we don't lose you, but good luck whichever way you go!

David

I've just spend the better part of this 60 hour week (yes, at my job: risking my otherwise productive neck) just trying to get rails up and running in a way that is as "fast" and "easy" as all the hype

Rails is the fastest way to develop a site that I know of.

Since you're a PHP coder, look here:

http://www.phpwact.org/php/mvc_frameworks

Look at the entries in the "Modeled after" column, do you see all the "Ruby on Rails" entries? There's a reason for that.

suggests. So hear me out for a bit on my reasons for why I'm giving up. Perhaps somebody out there will recognize this as a desperate cry for help and save me from committing platform suicide.

The reasons:

1) I don't know Ruby

I'm not aware of anyone who is born knowing Ruby. Like any other programming language, it must be learned.

2) A bad experience with ruby 1.8.6 p 230 (STILL!? the most prominent link on the rails download page)

So try another version. Does your Linux distro not provide a stable, secure version of Ruby? Mine does. And if you're unhappy with your distro's offerings you can switch distros or compile from source. A single bad experience with a single version of Ruby seems pretty small potatoes to me.

3) Unstable documentation    a) old 1.x tutorials that don't work with the recent 2.x downloads

And? This seems a non-problem to me. If you're using a 2.x Rails, then look for the 2.x series tutorials.

   b) not as much of a community/following in my areas (linux, postgres, academia)

Blather. I use Linux and I work in academia and I haven't ran into any real show-stoppers. PostgreSQL works fine with Rails. Rails even plays nice with Oracle.

   c) language barriers to entry (despite the appeal of ruby's and rails' internationality)

Your English seems fine to me.

   d) the fact that the current best documentation is a soon-to- obsolete book (and $54 at that!)

"The Rails Way" is the current best documentation in my opinion, and it can be had for much less than $54, online. There's nothing forcing you to use the latest not-yet-released version of Rails.

        Agile Web Development with Rails 7 by Sam Ruby    e) the api documentation http://api.rubyonrails.org/ is overwhelming and ugly

Overwhelming perhaps to you but it works really well for me and thousands? of others. There are other versions of the Rails docs and different ways to navigate it:

http://railsmanual.org/ http://start.gotapi.com/

There is also Ruby's ri to lookup individual methods and classes.

   f) contentious, contradicting and out of date wiki-ing

Wikis are a community effort. If you find a mistake please correct it for the next person who comes along.

4) Auto renaming: I thought it was cool (and I obliged) until rails renamed my "people" table to "peoples"

Rails makes assumptions about naming conventions, but all of them can be overridden. Learning the conventions is well worth the effort as they will help you, otherwise you will find working against them to be, well.. work.

5) Too much abstraction? Call me old fashioned but I'm kind of missing get and post and html forms

Here's a basic form:

<% form_tag do -%> <%= text_field :foo, :bar %> <%= submit_tag %> <% end -%>

What questions do you have about it?

6) Difficult integration with existing technologies.    b) apache: a million steps (including fastCGI) and it still doesn't work. (I'd been using WEBRick)

Mongrel is very simple to setup and works really well under Apache. Before I used that I used Lighttpd and it works equally well. I recently began using mod_rails and it works ok for how young it is. Most any setup you choose can be proxied under Apache. It's been an overall pleasant experience for me with any setup I tried. If you prefer a simple mod_php-like setup then try mod_rails.

   c) can't use an existing schema or existing database to build rails classes & forms (am I misunderstanding? I thought this is why rails was supposed to be so great? Is this not possible?)

We successfully wrapped a Rails app around a 4 year-old genetics database at work, on Oracle no less. It was work, but there were no show-stoppers to speak of. What specific problems are you having?

   d) foreign keys (and the associated one to many, many to many relationships) are not created or represented automatically in the database or web forms when using script/generate scaffold table1 var1:string var2:integer table2_id:integer

Don't use scaffolds for anything more than dazzling your clients during meetings.

This last one is the big one (the rest I'm willing to forgive for such an otherwise apparently elegant language and environment). If i can't easily see a compelling demonstration or working code snippet that proves this very basic relationship functionality is even possible, I'm not going to invest time mucking around in classes trying to learn ruby.

I learned Ruby reading a number of books about it. Mucking around in classes prior to having a basic understanding of the language seems a waste of time to me. Everyone learns their own way I guess, but I like books.

Why not use the information present in a variable name like table2_id? I guess I got the (incorrect?) impression that "if i could only rename my variables differently rails would understand and create these relationships for me! Including the corresponding necessary drop-down/select-box functionality in the views/layouts.

Rails does automatically create relationships for you, as you define them in your models. The data I feed to my drop-down selects works fine. Again, what specific problems are you having?

If someone can get me going on this last bit I just might give it another try. If not, Its back to non-object oriented PHP and web forms for me.

If that's what you want to do. After more than a decade using PHP, and then several years with Rails, I couldn't imagine the pain of having to build a new site with PHP again. Rails is really that good.

Thanks for letting me rant,

Letting you? I don't recall being asked :slight_smile:

Hi Dave.

schruthensis wrote:

I've just spend the better part of this 60 hour week (yes, at my job: risking my otherwise productive neck) just trying to get rails up and running in a way that is as "fast" and "easy" as all the hype suggests. So hear me out for a bit on my reasons for why I'm giving up. Perhaps somebody out there will recognize this as a desperate cry for help and save me from committing platform suicide.

Hm. The first thing I'd say is trying to learn a completely different language and framework while under pressure is probably always going to be a recipe for frustration. I don't mean to belittle you, but trying to jump into Rails in the middle of everything you're doing and expecting to instantly be productive was pretty naive. I've been developing in one language or another for about 14 years, and when I started learning Rails, I took it pretty slow. I didn't thrust it into my job or make my life depend on it. I picked up Agile Web Development With Rails and started reading and writing. It took a little while for things to start sinking in to the point that I was understanding what was going on. That was almost a year and half ago. Rails isn't perfect (nothing is), but I am *so* much happier than in any other language I've ever coded in. I still do some PHP work, but I'd rather write in Ruby and Rails. But it took some time.

The reasons:

1) I don't know Ruby

Learn it. It's awesome. I know there probably isn't anything that you can do in Ruby that you can't do in some other language, but Ruby is elegant and fun to use. In fact, over the past few days, I wrote some Ruby/ActiveRecord code to merge data from one database into another. Including whitespace, about 175 lines. Recursive to the point of me not knowing what my name is, but it works. [For anyone interested, I'll be making it available to the community soon. Maybe someone will find it useful.] I really can't imagine trying to do the same thing in any other language.

2) A bad experience with ruby 1.8.6 p 230 (STILL!? the most prominent link on the rails download page) 3) Unstable documentation     a) old 1.x tutorials that don't work with the recent 2.x downloads

If you can't find 2.x tutorials (they are out there), there is nothing stopping you from having multiple versions of Rails installed. Install the gem for Rails 1.2.6 and generate a new app for it with

$> rails _1.2.6_ my_app

That will tell Rails to create the app using version 1.2.6. Then the AWDWR book or all of those 1.2.x tutorials will work if you need them to.

    b) not as much of a community/following in my areas (linux, postgres, academia)

Not sure how this is that big of a deal academia is. People from all industries interact here and in other forums. Linux, PostgreSQL, etc, sure, but most deploy to Linux and many use PostgreSQL (I'm one of them). Lot's of people in this forum are extremely knowledgeable and helpful. If you have questions/problems, ask here.

    c) language barriers to entry (despite the appeal of ruby's and rails' internationality)     d) the fact that the current best documentation is a soon-to- obsolete book (and $54 at that!)          Agile Web Development with Rails 7 by Sam Ruby     e) the api documentation http://api.rubyonrails.org/ is overwhelming and ugly

I use http://www.railsbrain.com and am not having any problems. I also make regular visits to Index of Classes & Methods in Ruby 1.8.6 (Ruby 1.8.6).

    f) contentious, contradicting and out of date wiki-ing 4) Auto renaming: I thought it was cool (and I obliged) until rails renamed my "people" table to "peoples" 5) Too much abstraction? Call me old fashioned but I'm kind of missing get and post and html forms

Methinks once the Rails way clicks in your head, you won't miss them so much. I've been a database developer for many years (in fact, my last full-time job was as a DBA), so I've always had my hand right in the middle of the database. But once I got a hold of Rails' migrations, I don't do very much in the database any more. I still write some complicated queries every once in a while, but I let migrations hand all the schema. You might find the same to be true for forms. If not, you can still hand code them if you want, but boy you'd be missing out on some ease.

6) Difficult integration with existing technologies.     b) apache: a million steps (including fastCGI) and it still doesn't work. (I'd been using WEBRick)

FCGI is "old school". As others have noted, most people are proxying from Apache/nginx/lighty/whatever to Mongrel. The only "challenge" with that is the proxy configuration and the balancer if running a Mongrel cluster, but even that isn't so hard. There are plenty of sites with instructions. If I can figure it out, most Rails developers should be able to as well. I have recent began using mod_rails, and it seems promising. If you don't need anything fancy, you can also look at LiteSpeed, which I had used for a while. But it isn't open source and the higher performing version is not free.

    c) can't use an existing schema or existing database to build rails classes & forms (am I misunderstanding? I thought this is why rails was supposed to be so great? Is this not possible?)

It is *possible*, but from what I hear, painful. Rails is very opinionated. The path of least resistance is to do things the Rails way.

    d) foreign keys (and the associated one to many, many to many relationships) are not created or represented automatically in the database or web forms when using script/generate scaffold table1 var1:string var2:integer table2_id:integer

This, I believe, is a misconception on your part. Rails will *not* create associations automatically in the database. All of Rails associations are enforced in the framework. You can *use* Rails to create indexes and associations, but it's not going to happen automatically.

This last one is the big one (the rest I'm willing to forgive for such an otherwise apparently elegant language and environment). If i can't easily see a compelling demonstration or working code snippet that proves this very basic relationship functionality is even possible, I'm not going to invest time mucking around in classes trying to learn ruby.

Again, as someone else eluded to, "mucking around in classes" is probably not the best way to learn Ruby.

Why not use the information present in a variable name like table2_id? I guess I got the (incorrect?) impression that "if i could only rename my variables differently rails would understand and create these relationships for me! Including the corresponding necessary drop-down/select-box functionality in the views/layouts.

Again, Rails is not going to this stuff automagically. It makes it a lot easier, but Rails can't read your mind. Just because you have a relationship between two tables doesn't mean you always want a drop down list.

If someone can get me going on this last bit I just might give it another try. If not, Its back to non-object oriented PHP and web forms for me.

Rails isn't for everyone, but I have not yet heard anyone who gave Rails a real, honest effort say, "I don't like this. I'm going back to XYZ." My advice (if you are open to it) is to back up, take a deep breath, and start over. Don't try to learn Ruby and Rails while under pressure. Work at it on the side until you get the hang of it. And don't approach it just like you would PHP (or XYZ). Ruby and Rails are their own beasts, and they respond to different music than other beasts. Once you learn the right melodies, you'll be happily soothing the beasts and reaping the benefits of the Rails framework.

Thanks for letting me rant,

Dave

Peace, Phillip

Hi, I am working in a team which has two other guys, one from a PHP exposure and the other from Java. When we started working in Rails, it was their first time and both encountered their own set of problems which were quite unique to what their prior experience was. The Java guy's biggest problem was that he often compared the documentation support between Rails (and the extra-core code) and Java. The PHP guy often complained that he found it hard to work with ActiveRecord, when in PHP all he ever did was simply plug in SQL and not worry much about the nitty gritties of the Rails conventions. There were other rants of course but mostly it was not due to Rails but because of some kind of comparison between the programming experience. Now I had a different learning curve. I started learning Rails (and of course Ruby) in my extra time and not in a professional capacity. I think THAT is one of the many reasons which puts people off. The situation when you get on the learning curve and things dont seem the same when they heard a lot about Rails. For a person coming from PHP background, it takes some time to get used to the Ruby/Rails way. From what I have observed mostly people get attracted to Rails by the many screencasts and presentations which show that an application can be put up from scratch in a very short time. Now, there are 2 things. 1: The applications obviously are simple but in real life we hardly use scaffolding. 2: If it is a complex application then the person who claims he can set it up in record time HAS actually spent a lot of time to wrap his brain around the language. And as far as the documentation support is concerned it is there, maybe it is not great but it does it's job. Plus, Rails has not been here for so long that there would be a very mature set of documentary stuff. For undocumented stuff there are blogs. The community support may not be sweeping but it has it's select bunch of people who are doing their bit. And of course you need to know how and where to look for stuff. So essentially what I mean to say that it is great to use Rails, but like any other language it has it's learning curve. Moreover, the learning curve is also not one which I would advise to climb in an intense situation where there is no time to understand the dynamic nature of the language. And lastly in the end it is just a matter of your taste and opinion. With Rails I thinks either you love it or you hate it. It is a language for the highly opinionated and to develop an opinion (=love) about it you need to spend a lot of time with it. Eventually the outcome would be great when you can be real fast and neat but to get there you need to be working hard. Remember, there are no free lunches :slight_smile:

BTW I agree that The Rails Way is an amazing book. The Pickaxe is a good book to get you started but The Rails Way is very neat.

Many of Dave's reasons for giving up on Rails are similar to the reasons I gave up on Rails back when I first tried it. But recently I decided to come back and take another look. So, the following are a few thoughts from a returning newbie's perspective.

1) I don't know Ruby

So? If you want to use Rails, learn Ruby. Not knowing Ruby is not a reason to give up on Rails. I don't know Ruby either but am learning as I go.

2) A bad experience with ruby 1.8.6 p 230 (STILL!? the most prominent link on the rails download page)

I guess I'm lucky. Installing Rails on my Debian box was as easy as:

# aptitude install rails

3) Unstable documentation

This is an area where I couldn't agree more.

   a) old 1.x tutorials that don't work with the recent 2.x downloads

Recently when I decided to take another look at Rails I was surprised to find all the tutorial links on the RubyOnRails.org web site pointed to 1.x tutorials. Someone else replying to Dave's post suggested that he look for 2.x tutorials if he's running version 2.x. I have a crazy idea. How about updating the tutorial links on the Rails web site, pointing them at tutorials that are written for the current version of Rails? The current Rails version number, currently 2.1, sticks out like a sore thumb on the front page of Rails web site. Maybe whoever updates the front page should drop the person who takes care of the documentation page a note each time he/she updates the version number.

   d) the fact that the current best documentation is a soon-to- obsolete book (and $54 at that!)

Back when I first tried Rails I bought the current edition of Agile Web Development, which at that time was the first edition. I was surprised at how quickly the book became obsolete. Now that I'm back taking another look at Rails I, perhaps against my better judgment, ordered the third edition beta book. Hopefully it will take a little longer for this edition to become obsolete. I think Rails' rapid development is one of it's greatest strengths and also one of it's greatest weaknesses. Documentation has trouble keeping up.

   e) the api documentation http://api.rubyonrails.org/ is overwhelming and ugly

I'm not sure if it's exactly overwhelming. But, it's definitely ugly. Could someone mention to the API site's webmaster that frames went out of style towards the end of the last millennium? I generally try to avoid browsing the API docs because of the site's layout.

5) Too much abstraction? Call me old fashioned but I'm kind of missing get and post and html forms

Okay, you're old fashioned. :slight_smile: I'm old fashioned about a lot of things myself. I shave with a straight razor. Almost every vehicle I've ever owned has has a standard transmission. Where non-web apps are concerned I prefer TUI(Text User Interface) based apps. And, I work as an IBM mainframe operator. But for web apps I'll take Rails' abstraction over "old fashioned" web development any day.

   b) apache: a million steps (including fastCGI) and it still doesn't work. (I'd been using WEBRick)

I haven't tried setting up Rails behind Apache yet. I'm still working my way through the Agile Web Development example app and am still using WEBrick. But, I don't anticipate any problems with Apache.

   c) can't use an existing schema or existing database to build rails classes & forms (am I misunderstanding? I thought this is why rails was supposed to be so great? Is this not possible?)

I had a similar experience recently when I switched one of my web sites from PHP to Django. At the time I also switched from MySQL to PostgreSQL. I ended up just setting up a bright shiny new schema in Django then massaged the data from the old database to get into the new one.

Kevin http://www.RawFedDogs.net http://www.WacoAgilityGroup.org Bruceville, TX

Si hoc legere scis nimium eruditionis habes. Longum iter est per praecepta, breve et efficax per exempla!!!

My background is Java and PHP. I started with RoR just one year ago and will never go back. From your points - it seems you just got off to a wrong start. I would suggest taking one of the rails book that walks through building an app from scratch - thats how I got started - and it then becomes second nature.

An example of how quickly I got started - I build http://www.MyDogSpace.com in just 6/8 weeks (its advanced further now - but you get the idea)

The reasons: 1) I don't know Ruby

you just started the wrong way. start learning ruby (which is in fact a very nice language) or you won't be able to learn rails. rails relies in the concept of "convention over configuration" which means that most configuration files are expressed in the code. and more, most configuration files (like routes.rb) are in fact ruby code. so when you learn ruby you are in fact learning rails, it's like a DRY for learning. :slight_smile:

> d) the fact that the current best documentation is a soon-to- > obsolete book (and $54 at that!) > http://pragprog.com/titles/rails3/agile-web-development-with-rails-th… > e) the api documentationhttp://api.rubyonrails.org/ is > overwhelming and ugly

I usehttp://www.railsbrain.com and am not having any problems. I also make regular visits tohttp://www.ruby-doc.org/core-1.8.6/index.html.

I can at least help with obsolete documentation: the best book right now is The Rails Way by Obie Fernandez:

4.5 stars, and covers latest version.

Ron

I was bitten by this too. If you have an object called 'Person' the table name is 'People'. Technically correct but a bit confusing. I switched to using Participant. I had this problem back in 1.2.x when I was starting out with Rails and I agree it was a bit baffling. Perhaps now I would like it.

script/generate model person name:string       exists app/models/       exists test/unit/       exists test/fixtures/       create app/models/person.rb       create test/unit/person_test.rb       create test/fixtures/people.yml       exists db/migrate       create db/migrate/20080804122242_create_people.rb

c\) can&#39;t use an existing schema or existing database to build

rails classes & forms (am I misunderstanding? I thought this is why rails was supposed to be so great? Is this not possible?)

There's quite a discussion at http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/2e95e738ad82a602/1436710f75a17e60?hl=en&lnk=gst&q=paron#1436710f75a17e60

That link will take you to response #26 or so; mine. There are links down the page a little to "introspecting" scaffold plugins, which actually behave similarly to the original scaffolding in Rails <2. They walk through your data tables and create pages and forms neatly labeled with your field names.

I like them. I inherit datatables and structures that I'd never design myself, and the introspecting scaffolding saves me a ton of typing.

Here's what I said there, and I still think it is true:

c\) can&#39;t use an existing schema or existing database to build

rails classes & forms (am I misunderstanding? I thought this is why rails was supposed to be so great? Is this not possible?)

There's quite a discussion at http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/2e95e738ad82a602/1436710f75a17e60?hl=en&lnk=gst&q=paron#1436710f75a17e60

That link will take you to response #26 or so; mine. There are links down the page a little to "introspecting" scaffold plugins, which actually behave similarly to the original scaffolding in Rails <2. They walk through your data tables and create pages and forms neatly labeled with your field names.

I like them. I inherit datatables and structures that I'd never design myself, and the introspecting scaffolding saves me a ton of typing.

Here's what I said there, and I still think it is true:

BTW: if you buy the book in PDF format from the pragprog site you will get the working copy, which is up-to-date with Rails, and they will email you any time the PDF is updated. I've been using it that way for a few months, and they'll ship me a paper copy when it's done.

Well Talk,

Several weeks later I'm still here! I think I owe this list an apology for freaking out and a thanks for helping me through this.

Some of the highlights since my last post here are:

1) I've now got a fully functional Rails instance up and running with ~ 20 tables and 10 pages with superb AJAX-ified and CSS-stylized CRUD interface (thanks to *active scaffold*! And for Paron above for pointing me towards it!)

2) I got apache proxying my Mongrel server (thanks Fredrick) so that now everything is nice and daemonized and I still get to use Apache at the same time!

3) I bought "The Rails Way" and found it quite useful (thanks again Paron and Shashank!) for the very little of it that I read while getting side tracked down the cappastrano path (we are a really small shop and I'm only making an internal db interface for now)

4) I even got to take part in a beginning Rails book review process for a major computer book publisher! (a nice side-benefit of being the squeaky wheel / master complainer).

5) AND! I did it all without really even trying to learn any Ruby.. Someday I will... I still have "Beginning Ruby" sitting on my shelf.

HOWEVER:

I still haven't figured out how to create all the forms from an existing schema but that's not as much of an issue now.

And I still think that scaffolding could be super useful and that someone (perhaps me someday) could re-write it so it uses the foreign key fields to infer the HM, BT, & HABTM relationships... If i did this, I would probably write it to build pages for active scaffold... anybody want to work on this with me?

hi,

Hm. The first thing I'd say is trying to learn a completely different language and framework while under pressure is probably always going to be a recipe for frustration.

with emphasis on "under pressure"

but that is true for each and every knowledge/experience/learning, isn't it?

time is the magic word to "fill your brain" - always and ever. If you want to learn things, you have to pay the price - and invest the most original thing in universe, which cannot be copied/multiplicated/ hoarded...

look at me - RPG on AS/400 - green screen and texts as GUI...

i tried 4GLs, C++, Java, PHP, Python, whatever - forgot the most - but you are "corrupted" for the most established environments, when you know the AS/400 - as programmer, the words "OS" or "database" are not worth to be mentioned - because it works - and works - and works...

then i worked with a 4GL, which did some nice metaprogramming things....

so i looked for a combination - an environment with nice metaprogrammings, but rescuing me from all that boring stuff about OS/ middleware, databases or browsers...

and now i use Rails, because it is the easiest way to do the things you want to do - without always caring about trivialities (ok, not perfectly, but mostly :wink: )...

I don't mean to belittle you, but trying to jump into Rails in the middle of everything you're doing and expecting to instantly be productive was pretty naive... But it took some time.

the magic word "time" :wink:

i also paid the price - and i am happy about

my way? Start from the beginning + Do it Yourself

i rewrote a simple (but not too simple!) software in RoR, without reading more than an introduction in Ruby, you read enough during the programming :wink: - has two advantages: you learn Rails and you can compare the code

btw: the "first code" will surely not be your finest, but you will be amazed by the comparison, i guess...

:wink:

ff

Wow! Another RPGer! I thought I was the only one. :wink:

I still love the iSeries/AS400/i5/System i... and that's how I make my living but after months of working on the side with RoR for a friend and finally rolling out our first production app I am very happy I have made (and still making) the effort of learning it. Lots to learn, but very rewarding.

Pepe

I have been developing a rails powered website for the past year and 2 months. And while I had a limited experience in PHP and come from a programming background (in college) of C++ and Java, I can't imagine doing what I have done in PHP or any of the other languages I have used. For one, my year project would become a two maybe evene three year project if done in another language. Like I said my PHP programming is limited and I found it relatively easy to learn, but I found rails just as easy but also much more efficient. Since I have started my project I have dived into everything: Credit Card validation, form validation, sessions, dynamic pages, password encryption, guarding again cross-site scripting, user validation and authentication, yada yada yada. And now, even though I encounter a few minor problems here and there, my project is now used by sevel hundred people with that number to reach probobly several thoussand by the end of the year. And I did this fresh out of college and having never even heard of Ruby On Rails untell I was interviewed by my current boss and he asked me: "Have you ever programmed in Ruby On Rails?" Nope. But he still hired me and I am sure glad he did and I hope he is glag he did.

All I can say is that I am pround of what I have done over the past year having never used RoR and this being my first job (in the IT field), oh, and I did this all as a one man project, just me, myself and I. Sure I got frusterated plenty of times and had peroids of banging my head against the computer commonitor, but I believe that the same project done in another language would have taken two maybe even three times as long.

I'm not going to tell you to give RoR another chance, but I will say that I don't think you can deny the power behind rails and the fact that you can create ONE HELL of a website in a short amount of time that is not only dynamic but secure and just flat out a KICK ASS.

I will agree, however, that the documentation needs help - serious help. Sure Java had some great documentation and it's easy to critize and say why can't it be like that for Ruby and Rails? That would be a great project for someone to do, hmmmmm. And also, it is quite a chore to get a server running rails, but, the framework itself saves so much time and effort that I believe it is still worth it to do your projects in Rails despite those setbacks.

Alright, I'm done preaching. Good luck to you and whatever decision you make,

-S

Shandy,

Your story is typical of those that use RoR. However, the problem that schruthensis describes is that he cannot even get it going to find OUT how good it is. I find that I am in the same boat. I have spent the last 8 days at work and I cannot even get a "hello world" to work in rails. I am ready to gnaw off a limb to survive and am looking into PHP just because I am hoping that I can get something, ANYTHING, to work. I have made great websites in other languages and REALLY want to do it all in Ruby but I cannot get over the initial hurdle anymore than schruthensis can.

It is a lot of time and effort to expend with nothing to show for it, especially when there is a boss glaring with looks of recrimination for "lack of productivity." While I am not quite under the same gun as schruthensis, still 8 days with nothing to show is stressful and I can empathize with him.

p.s. I have bought books by the stack and ebooks by the disk load. I have read through them and they all show the magic occurring after ruby is up and running. Go figure. Anyway, it is not the books that give the answers either.

Have you tried instant rails? http://instantrails.rubyforge.org/

Should be enough to get you going (assuming that you are using windows at least).