Planet MySQL Planet MySQL: Meta Deutsch Español Français Italiano 日本語 Русский Português 中文
10 Newer Entries Showing entries 31 to 37

Displaying posts with tag: rails (reset)

Rails/Ruby News - Resources, Tutorials, Adoption Stories
Employee_Team +0 Vote Up -0Vote Down

Trying to catch up a bit on Ruby/Rails/JRuby related news...

Two new NetBeans 6.1 Ruby tutorials: Getting Started With Ruby and Rails and Using Java Libraries in Rails Applications. The last topic is one of the big benefits of JRuby, one example is this report of Calling into Sun's SSO and another is this Tutorial showing Invoking Java 2D Graphics.

A recent adoption story is

  [Read more...]
ActiveRecord does not suck
+0 Vote Up -0Vote Down
I've been reading a few blog postings such as Kore Nordmann's ActiveRecord sucks and Mike Seth's ActiveRecord sucks, but Kore Nordmann is wrong.ActiveRecord is fine.  It is a tool that does just what it's designed to do.  What sucks is when developers try to make it do other things than what it's intended to do.I worked for Zend, managing the Zend Framework project through its 1.0 release.  I
32bit VS 64bit - what do you use?
+0 Vote Up -0Vote Down

Hello my dear readers.

Today I have a question for all of you. What platforms (32bit or 64 bit) do you use for your servers with more than 4Gb RAM? I’m asking because recently we‘ve hit few really weird bugs in Linux kernels 2.6.18 to 2.6.22 and all those bugs were PAE-related. Now I’d really love to move all machines to 64-bit, but I’m in doubt because we don’t know too much about Rails stack (ruby, mongrel, haproxy) on 64-bit platforms (all our DB boxes are 64-bit of course).

So, please drop me a line if you have any experience (negative or positive) with Rails platform on 64-bit machines. I’d really appreciate your help.

JRuby 1.0.3 + Rails 2.0 Hello World - Additional Steps Required
Employee +0 Vote Up -0Vote Down

JRuby 1.0.3
was recently released and so was Rails 2.0. I decided to try JRuby 1.0.3 + Rails 2.0 and realized that a few additional steps (because of Rails 2.0) are required to get a trivial Hello World applcation up and running. Here are the steps:

  • Unzip JRuby 1.0.3.
  • Make sure to set JAVA_HOME and JRUBY_HOME.
  • Also include JAVA_HOME/bin and JRUBY_HOME/bin in PATH for convenience.
  • Install Rails 2.0 as shown below:

    ~/samples/jruby arungupta$ jruby -S gem install rails --include-dependencies




  •   [Read more...]
    Innodb Locks, ActiveRecord and acts_as_ferret Problem
    +0 Vote Up -0Vote Down

    Last few days one of our customers (one of the largest Ruby on Rails sites on the Net) was struggling to solve some really strange problem - once upon a time they were getting an error from ActiveRecord on their site:

    1
    (ActiveRecord::StatementInvalid) "Mysql::Error: Lock wait timeout exceeded; try restarting transaction: UPDATE some_table.....

    They have innodb_lock_wait_timeout set to 20 seconds. After a few hours of looking for strange transactions we were decided to create s script to dump SHOW INNODB STATUS and SHOW FULL PROCESSLIST commands output to a file every 10 seconds to catch one of those moments when this error occurred.

    Today we’ve got next error and started digging in our logs…

    After a couple of hours of looking in logs, parsing binary logs from MySQL


      [Read more...]
    Loading a MySQL database in memory (with some Ruby help)
    +0 Vote Up -0Vote Down

    Let’s say when you have to run a batch process monthly, you can survive with times like 10 minutes. I can imagine a lot of seasoned DBAs right now ROFL about my insignificant 10 minutes. The point here is I was developing this process and some test cases, so my usual trial/error methodology doesn’t scale very well with 10 minute offsets.

    So I borrowed an idea from a colleague: why not moving all the database to memory? It’s not so big and I have 2G of ram. But, could I change all tables (~20) to MEMORY in one line or so?

    Since this was a Ruby on Rails project, I used the rails console to be able to mix SQL and Ruby. My first try:

    conn.tables.each do |t|
      conn.execute "ALTER TABLE #{t} ENGINE=MEMORY"
    end

      [Read more...]
    Looking For Optimal Solution: Ruby On Rails and Mongrel
    +0 Vote Up -0Vote Down

    This article is part of “Looking For Optimal Solution” series, devoted to testing various Ruby On Rails deployment schemes and doing some simple benchmarks on these schemes. General idea of testing is to find subset of most optimal RoR deployment schemes for different situations.

    This small article is about Rails+Mongrel setup and its performance. List of other tested deployment schemes, description of testing methodology and, of course, all benchmark results you can find on “Ruby On Rails Benchmark Summary and Findings” page.

    (more…)

    10 Newer Entries Showing entries 31 to 37

    Planet MySQL © 1995, 2014, Oracle Corporation and/or its affiliates   Legal Policies | Your Privacy Rights | Terms of Use

    Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.