Posts Tagged ‘ruby’
Review: Rails Deployment: Production Configuration and Advanced Rails Tactics
Rails Deployment: Production Configuration and Advanced Rails Tactics by Ezra Zygmuntowicz
My rating: 4 of 5 stars
Overall, this book had a lot of very good information, and it was very helpful to me as I deployed my first Ruby-On-Rails application into a “Production” environment.
Here’s the high points:
- Lots of good information on tools such as Capistrano, MySQL, Mongrel, Apache, and nginx.
- The authors clearly know what they are talking about.
- It’s helpful if you’re deploying a “toy” application (like I am) and if you’re deploying a large, clustered application.
- It doesn’t assume that you’re already an expert on either Web app deployment or Ruby-On-Rails.
Here are some of the things that could be better:
- This book was published over a year ago, and it already feels out-of-date. For example, there isn’t one mention of Phusion Passenger, even though this tool seems to be the new standard app server for Ruby-On-Rails in Production environments.
- This is very subjective, but I feel like the information could have been organized a little better. I felt as if the author jumped around a bit sometimes.
- Also, some of the passages were a little difficult to read due to their incorrect sentence structure. My writing isn’t perfect either, but I believe that the editor should have fixed more of these mistakes.
If you’re deploying a Ruby app in any setting, then this is a good book to get. I just don’t know if I would actually buy it.
Review: Agile Development With Rails, 3rd Edition
Agile Web Development with Rails: A Pragmatic Guide by Dave Thomas
My rating: 4 of 5 stars
In general, this book does a fairly good job of helping you create a rails-based application. Part 3 includes some great in-depth information on the topics that are briefly discussed in Part 2.
I only have one real gripe about this book. It packs in lots of topics (e.g. db theory, AJAX, unit testing, security, deployment), but it doesn’t really tell you much about them. Therefore, if you have a problem, then good luck figuring it out using the content in the book.
A good example is the final chapter which covers deployment. The chapter devotes only a few small paragraphs to configuring Apache for passenger. To me, this section was completely useless unless you were already an expert with Apache configuration. I ended that chapter with a broken Apache server and no resources (from the book) to begin fixing it.
Another problem that I had with that chapter is that it really didn’t follow the pattern that the chapters in Part 2 used. In those chapters, the authors would should you how to do something relatively small, show you how to test it, and then provide some troubleshooting information if the task was particularly complex. The deployment chapter gave you a *very brief and generalized* tutorial in each section, and then just assumed that everything went perfectly. It didn’t show you how to test anything, and it didn’t help you troubleshoot any possible problems.
Don’t get me wrong. I know that no book will provide all of the information that I would ever need about a subject, and thank goodness for the internet in these situations. I was just hoping that all of the chapters in a book that I actually bought would provide better information than some person’s blog.
So in general, I guess I would have to say that this was a very good book with some bad chapters that were tacked-on at the end.
Walking With Rails 1 – Setup On Ubuntu
Overview
One of my goals for 2010 is to gain a decent understanding of the Ruby On Rails framework. I don’t think that this knowledge will directly help me with my current job (as a FileNet P8 administrator), but I do think that it will provide some good benefits.
First, learning about something that’s a little bit outside of your comfort zone can often help you with your day-to-day tasks. For example, if you teach yourself the basics of Java development, then you will know how to read a stack trace. Having this knowledge is very important if you want to administer software written in Java.
Also, it’s just fun. Creating something useful out of a few lines of text never ceases to amaze me. Also, I find that learning new technical skills is good for your brain.
Finally, who knows what the future may bring? It never hurts to know as much as you can about popular technologies in general when you work in IT.
So to get started, I purchased a copy of Agile Web Development with Rails, Third Edition from the Pragmatic Programmers’ web site. This book seems to be one of the best for beginners, and I really love that you can buy DRM-free ebooks from the Pragmatic Programmers’ web site.
Installing Ubuntu Packages
So enough background information. Here’s how I set up my system to get started with Rails development. First, I installed all of the necessary software on my Ubuntu 9.10 machine that was available as an Ubuntu package:
sudo apt-get install rails ruby-full rubygems rake mongrel git-core sqlite3
Here’s why I installed more than just the rails and ruby pacakges. When you install Ruby from source on a Linux machine, you get a lot of software. In addition to the Ruby runtime, you get fun tools like irb, rubygems, rdoc, ri, and rake. However, when you install the ruby package on Ubuntu and Debian, you just get the Ruby runtime along with a a couple of libraries. Since I’m lazy efficient guy, I decided to install the ruby-full package instead to save a few keystrokes. Unfortunately, the ruby-full package still doesn’t include rake or rubygems, so I installed those manually.
Mongrel is a developer’s web server that is designed to work very well with Ruby on Rails development. Since I am also impatient, I wanted a web server that would work a little faster than WEBrick.
Finally, I installed git because I wanted to share code between two different computers. Git is a version control system that is very popular with Ruby developers, so I figured that I would use the most popular Ruby-related tools while I’m learning about Ruby.
Installing Software Without apt-get
Natrually, you can’t install everything that you need with apt-get. For starters, the version of rails that is used in Agile Web Development with Rails, Third Edition is 2.2.2, so let’s install that using rubygems:
sudo gem install rails --version 2.2.2
This operation took a little while (~ 7 minutes) on my machine for some reason.
Note: For some reason, this bog
Next, I’m a Vim user, so I would like to see if the rails.vim plugin would help me at all. There is an official Ubuntu package for this plugin called vim-rails, but when I try to install it using apt-get, I get the following error:
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:The following packages have unmet dependencies:
vim-rails: Depends: vim-full but it is not installable
E: Broken packages
When I tried to install the vim-full package on my machine, I got this error:
Package vim-full is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package vim-full has no installation candidate
Ok, so after all of that, let’s just install it the easy way:
(Download the latest version of rails.zip from the rails.vim download page)
$ cp rails.zip ~/.vim$ cd ~/.vim$ unzip rails.zip
Finally, open vim or gvim and execute the following command:
:helptags ~/.vim/doc
In case your interested, here are the other Vim-related packages that I have installed on my machine:
- vim-common
- vim-gnome
- vim-gui-commom
- vim-runtime
- vim-tiny
Conclusion
And that’s it! I now appear to have everything that I need to complete the beginning examples in Agile Web Development with Rails using Ubuntu 9.10 and Vim.
Update (1/20/10) – I added the sqlite3 package to the apt-get line above. This package is necessary if you want to query your database manually.

