I’m working on a proof of concept Rails project. It’s a relatively simple application that will be a lot more complex down the road, and I need to decide whether it makes sense to write it (and perhaps subsequent applications that are related) in Ruby on Rails, or whether I should write them with the usual stack that I’m more familiar with: Java, Spring, Hibernate, Tomcat, etc.
While I really like the ease of getting things up and running with Rails, I’m reminded frequently of the value of experience. When something isn’t working right in a Rails application, I have no idea what I need to do to fix it. Five plus years of coding in Java means that I at least know where to start looking when things break. In Rails, I’m clueless, and the framework does a lot of stuff somewhat magically, so popping the hood is that much harder.
This isn’t to say that Java is better than Rails, but rather that lots of experience is better than none.
Rails, MySQL, OS X, pain
This is purely a plea for aid, and nothing more. I have Ruby 1.8.2, Rails 0.13.1, and MySQL 4.14 running under Mac OS X 10.4. I have a simple Rails application that works fine, except that most of the time when I try to perform an operation that uses a database transaction, WEBrick hangs. The only way to stop it is to use
kill -9
or restart MySQL. Usually the output in the log looks something like this when it hangs:Question Columns (0.006397) SHOW FIELDS FROM questions
SQL (0.000621) BEGIN
User Load (0.007152) SELECT * FROM users WHERE users.id = 1 LIMIT 1
I can’t connect to the running process with
breakpointer
and use of the MySQLshow processlist
command shows that the database connection WEBrick is using is idle. Anyone Rails experts have any ideas here? Exhaustive searches of Google and attempts to seek help on the Rails IRC channel have proven fruitless this time around.I should also note that the problems are intermittent. I can update or insert some rows in some tables some of the time, and other times things seem to work.
Update: Running the application under Locomotive works, so the problem must be something with the Ruby install on this computer. That’s one problem with any complex Web application these days — too many moving parts under the hood.