Search

Recent Posts

Tags


« | Main | »

Tormenting the Rails Newbee

By Dale Reagan | December 5, 2011

It has to be intentional, right?  If you explore/work with Rails (Ruby on Rails) then some experiences that you can count on:

Why is this? Is this unique to Rails? (sadly, no…)

Caveat – after 20+ years of working on systems and with development environments my views are most likely not the same as folks who only have experience with the current generation of technologies.  I am not suggesting that folks change their approach (unless, of course, they are not happy with a seemingly endless set of ‘background issues’ that seems to be the norm for ‘newbee’ Rails projects.)  While it could be argued that the type of experiences encountered in development environments in general is full of these types of issues my view is that the Ruby on Rails environment presents an excessive amount of such problems.  ( And, I will note that Java/other ‘modern’ environments may have similar barriers but I have not recently explored them…)

RVM – Ruby Version Manager

RVM may provide a bit of a buffer to ‘Rails Version Issues’ so I strongly suggest that you consider using it.  I would also be surprised if it (or something similar) did not become part of the standard Rails distribution – IMO RVM presents a ‘best practice’ approach for working with ROR.

In the book Ruby on Rails Tutorial: Learn Rails by Example Michael Hartl he writes: “Also beware that lots of little things can go wrong….”, and a few sentences later on the same page, “When things like this happen to you, it’s always frustrating, but at least you know that it happens to everyone…”  [ Note that I purchased both the book and video combo product and liked them enough to become an ‘affiliate’ so clicking the link above AND purchasing help support this site – off course you could also hit the donate button…:) ]  BTW – if you are using the book/videos then you need to review the updates on the site – Chapter 13 covers Rails 3.1.

I will speculate a bit that the reasons for Rails Mysteries include:

Many years ago I worked with a largish number of developers who had (seemingly) small/little real OS knowledge – they were great coders/developers but if/when they stepped outside of their development bubble they called for help from the ‘tech-ops/OS team‘. Today what I am seeing is folks who know little are being advised by folks who only know a little more than the knowledge seeker. With cloud eco-systems blooming everywhere, the development trend is to put everything ‘in the cloud’; I don’t see much thought going into other approaches (I will guess that using ‘the cloud’ is simply too easy when compared to managing things internally, and the economics are inviting – but what is the real cost of all these wonderfully free/low-cost solutions?)

IMO the emergence of ‘dev-ops’ is eroding the ‘tech-ops’ foundational understanding/view that previously supported development/production environments – developers have been turned loose in production environments and are doing things ‘their own way’ (i.e. in a semi-managed fashion and with short-term thinking dominating, “It works so it must be ok?“)  In many ways it is like turning the clock back in time when the default settings for most OS services was ‘open’ instead of the current ‘locked down’; a result of ‘best practices’ being adopted – what would happen if we started with ‘best practices’? (If they don’t exist then create them! set the bar!)

So what’s good about these environments?

Slow is Fast

This adage is something that could help:

An example – from the Rails Getting Started Web Page (12/2011)

1 Guide Assumptions

This guide is designed for beginners who want to get started with a Rails application from scratch. It does not assume that you have any prior experience with Rails. However, to get the most out of it, you need to have some prerequisites installed:

Note that Ruby 1.8.7 p248 and p249 have marshaling bugs that crash Rails 3.0. Ruby Enterprise Edition have these fixed since release 1.8.7-2010.02 though. On the 1.9 front, Ruby 1.9.1 is not usable because it outright segfaults on Rails 3.0, so if you want to use Rails 3 with 1.9.x jump on 1.9.2 for smooth sailing.


Based on my recent experience (trying ROR on multiple virtual machines and OS versions) the above is almost enough information to get a working ROR environment.  I have found that there are frequent requirements for ‘system header files’ or ‘development header files’ – something I would expect in a pure ‘C’ development environment; these types of components should be listed as core/base requirements and the ROR install process should check for them (IMO.)  Some suggested additional development related packages/tools that you may need for a ROR development system include:

  1. gcc
  2. gcc system/OS header files
  3. sqlite ‘development’ files
  4. zlib ‘development’ files

As you install new ‘gems’ you may be prompted to install additional ‘system support components’, i.e. the Nokogiri gem has a number of system level requirements – and the gem provides quite helpful pointers for resolving the issues.

As always, your mileage will vary and, in this case, I hope have fewer bumps as ROR matures.  🙂

Topics: Computer Technology, ROR, Web Problem Solving, Web Technologies | Comments Off on Tormenting the Rails Newbee

Comments are closed.


________________________________________________
YOUR GeoIP Data | Ip: 73.21.121.1
Continent: NA | Country Code: US | Country Name: United States
Region: | State/Region Name: | City:
(US only) Area Code: 0 | Postal code/Zip:
Latitude: 38.000000 | Longitude: -97.000000
Note - if using a mobile device your physical location may NOT be accurate...
________________________________________________

Georgia-USA.Com - Web Hosting for Business
____________________________________