4 ms·
Biggest gripe I had with rails is its learning curve. I have started to read Michael Hartl's impressive tutorial book but gave up when I started to deal with er
by f4stjack 14y ago
Biggest gripe I had with rails is its learning curve. I have started to read Michael Hartl's impressive tutorial book but gave up when I started to deal with errors related to gemfile dependencies (if the versions do not match with the tutorial the expected outcome does not happen at best or you deal with errors at worst). I have bought Agile Web Development with Rails and thinking to start again because it is really new and I don't believe I'll encounter any problems. What do you do when you encounter such errors by the way?
- JonnieCache 14y agoRun `git blame` on the code pathway that's throwing the exception (in the gem.) Look at the changes that have occurred on it and either move back to a version of the gem that works, or change my code to suit the new version. Alternatively, look at the changelog or just manually decrement the version number until my tests pass, obviously taking care not to move back past any critical security updates. Also, the precise version numbers used in railstutorial are available in the code listings here: https://github.com/railstutorial/sample_app_2nd_ed/blob/master/Gemfile https://github.com/railstutorial/sample_app_2nd_ed/blob/mast... The (fast paced|aglie|slapdash) nature of the rails ecosystem does necessitate a certain degree of attention to detail when it comes to versioning. However this applies equally to sinatra. It's worse with node.
- f4stjack 14y agoThank you. Far as I understood there is no easy way to handle those errors. I'll take your comment into consideration when I start to learn it.
- JonnieCache 14y agoUse the source, luke!
- f4stjack 14y agobut I shouldn't get cocky, eh? :)
- JonnieCache 14y agoIn case it wasn't clear, that aphorism is supposed to be telling you to get into the habit of reading the source code of the libraries you use. It is often the fastest way to solve your problems, and you'll learn a lot about the lib and about the language in the process. Without the ability to do this one can only be a plumber fitting other peoples' appliances.
- rjbond3rd 14y agoHan Solo says, "Don't get cocky, kid," to Luke.
- mhartl 14y agoThe Rails Tutorial is at least as up-to-date as Agile Web Development with Rails. For example, two weeks ago I bumped the version of RSpec used in the tutorial, fixing a few minor bugs in the process. Just be sure to use the online version at http://railstutorial.org/book http://railstutorial.org/book or the most recent ebook from http://railstutorial.org/ http://railstutorial.org/ so that you get the freshest copy. If you use the Gemfile at http://railstutorial.org/gemfile http://railstutorial.org/gemfile in a clean Ruby environment and run bundle install, the issue of dependencies shouldn't even come up. If you continue to have trouble, drop me a line at admin@railstutorial.org.