Dec
5
2008
A couple of days ago I posted an entry about REE, Rails and Passenger setup.
Today we’ve received an email from Phusion about an updated version of REE:
Ruby Enterprise Edition 20081205 has been released.
This new update seems to address the most common problems what people have been encountering.
The main updates include:
- Better 64-bit support
- Better Mac OS X support
- RubyGems updated to version 1.3.1. (So you don’t need to update RubyGems like in my previous post)
- REE’s RubyGems no longer makes use of the existing gems (which fixes a lot of confusion and problems with native extensions)
- Integration with the RailsBench garbage collector patches
- A new command to track REE updates easily ($ ree-version)
Please visit the official site for more details and the announcement.
To upgrade from a previous version, simply install into the same prefix that you installed to last time. You can follow this guide in my previous post.
1,203 views | 1 comment | tags: ree, rubygems | posted in Ruby on Rails
Dec
3
2008
There are certain products which are currently shaking the Ruby / Rails community:
- One of them is the infamous Phusion Passenger which makes deploying Rails applications a piece of a cake using Apache web servers,
- And Ruby Enterprise Edition (aka REE) which promises better memory management and better scaleability of your Rails applications.
These are really promising projects and Passenger offers a really elegant and automated setup which makes it pretty easy to be installed. However, I still keep seeing people having problems using it with REE and Rails version 2.2.2 on blogs, RailsForum and mostly on IRC.
In this article I will describe how to set up all of them. Hopefully it will help you understand the basic ideology how a Ruby environment is set up.
You will learn how to install and set up the following products for Rails development/deployment:
- Apache 2.2
- Ruby Enterprise Edition
- RubyGems 1.3.1
- Ruby on Rails 2.2.2
- Passenger 2.1.0 (note: this is an edge version, not recommended in production environment, you can still use 2.0.4)
What you will need:
- Apache web server already set up,
- Root privileges to be able to compile and set up your server
- A basic understanding how to use the Terminal.
OK, let’s get started. Continue reading
4,017 views | 4 comments | tags: apache, passenger, ree, rubygems | posted in Ruby on Rails
Oct
21
2008
Wanna install the mysql gem for Ruby? You’d better do it since it’s already available, and you will need it anyway from Rails 2.2 since all database adapters are going to be extracted to 3rd party gems. Take a quick look at your development.log file:
cat development.log | grep -i "DEPRECATION WARNING"
You may see a lot of deprecation warnings related to the mysql database connector like these:
DEPRECATION WARNING: You’re using the Ruby-based MySQL library that ships with Rails. This library will be REMOVED FROM RAILS 2.2. Please switch to the offical mysql gem: `gem install mysql` See http://www.rubyonrails.org/deprecation for details. (called from mysql_connection at /Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/connection_adapters/mysql_adapter.rb:81)
Now you’d better install the mysql gem. I know, it is not a too easy task, a lot of people seem to have problems with it. If you type sudo gem install mysql your Terminal may return with errors:
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb install mysql
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... no
checking for mysql_query() in -lmysqlclient... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Yea, very disappointing I know, I know. But rather then start crying like a teenage girl you could check the error log and start thinking about what you are missing.
No, no, no, I am not talking about a million dollar penthouse or girlfriend in this case… You forgot to tell RubyGems where to look for the mysql header/source files. Without them it just cannot build a native extension on your machine.
Let’s provide some more information to the package manager so it will be able to build that beast on your machine:
sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
Building native extensions. This could take a while...
Successfully installed mysql-2.7
1 gem installed
Much better.
2,772 views | 18 comments | tags: mysql, rubygems | posted in Ruby on Rails