Timestamp vs. Datetime

We encountered a strange behavior in our Rails application: created_on timestamp was sometimes younger than updated_at_. For each item in our application, we had a created_on and an updated_at field in the database. These were supposed to be updated by the Rails framework at item creation and item update times respectively. However, created_on got to… Continue reading Timestamp vs. Datetime

Rails upgrade from 1.1.6 to 1.2.3

I have just finished rails and gems upgrade and it was surprisingly smooth. There were just one minor issue. The server was not able to start. It was teling me something like: /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:266:in `load_missing_constant’: uninitialized constant Recconfig (NameError) from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:452:in `const_missing’ from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:464:in `const_missing’ from ./script/../config/../config/environment.rb:34 from /opt/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/initializer.rb:41:in `run’ from ./script/../config/../config/environment.rb:15 from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require’ from… Continue reading Rails upgrade from 1.1.6 to 1.2.3

Ruby on Rails with Oracle

I am working on a prototype in an big company and they do store data in Oracle. It took me some time to set up RoR working with Oracle. So, here are the things you need to do. First of all, there is a great tutorial on Oracle site: http://www.oracle.com/technology/pub/articles/haefel-oracle-ruby.html. In fact, you need to:… Continue reading Ruby on Rails with Oracle

Rails application not working, no error displayed, just error code 500

I was facing a strange problem. My application was working fine, but after some time it stopped to respond. It just returned error code 500. No error message on the screen, no error message in the error log, everything seemed to be fine. I found few hints on the internet – reboot, delete all sessions…… Continue reading Rails application not working, no error displayed, just error code 500

Visualize your Rails schema

While doing some Ruby on Rails code refactoring, I realized I’d like to visualize the database schema of the application. An easy possibility is to print out db/schema.rb. This seems a bit too linear and little visual to me. OK, I’d better keep thinking. An enterprise approach would be to take a CASE machinery and… Continue reading Visualize your Rails schema

tamtami.com story

My uncle started to work as a truck driver. I must say, it is a tough job. You are driving from Barcelona to Warsaw, then to Zagreb and … He enjoys it. He travels a lot and see the whole Europe. He has got one major problem. The problem is navigation. Since the truck drivers… Continue reading tamtami.com story

Full text search in Ruby on Rails 3 – ferret

There are several possibilities how to use ferret in RoR. This post will show the easy way – using the acts_as_ferret plugin. To show the syntax and code, I will use the same data objects as in the Full text search in ruby on rails 2 – MySQL Installation Ferret installation is easy gem install… Continue reading Full text search in Ruby on Rails 3 – ferret