It is a tradition to do crazy and wild things on New Year's Eve. Some people play with fireworks and other noise making devices, other tend to celebrate the end of year by partying and drinking. I am not big fan of explosives and to sacrifice too many neurons to honor randomly chosen point on Sun's orbit sounds like a pretty silly idea. But still, I wanted to do something out-of-line on December 31st.
Following the book on JRuby I am discovering small differences when trying the examples. After installing activerecord-jdbc gem which is available in version 0.5, the shoplet application fails with Rails 2.0, as soon as you click on the 'About your application environment' link.
=> Booting Mongrel (use 'script/server webrick' to force WEBrick) => Rails application starting on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server ** Starting Mongrel listening at 0.0.0.0:3000 ** Starting Rails with development environment... ** Rails loaded. ** Loading any Rails specific GemPlugins ** Signals ready. TERM => stop. USR2 => restart. INT => stop (no restart). ** Rails signals registered. HUP => reload (without restart). It might not work well. ** Mongrel 1.1.2 available at 0.0.0.0:3000 ** Use CTRL-C to stop. Processing InfoController#properties (for 127.0.0.1 at 2007-12-23 23:13:25) [GET] Session ID: BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo%0ASGFzaHsABjoKQHVzZWR7AA%3D%3D--9791be23205677745e457b5bf62c50eba6e3813f Parameters: {"controller"=>"rails/info", "action"=>"properties"} Exception in thread "Ruby Thread11043409" java.lang.NoSuchMethodError: org.jruby.runtime.builtin.IRubyObject.setInstanceVariable(Ljava/lang/String;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject; at JdbcAdapterInternalService.set_connection(JdbcAdapterInternalService.java:122) at JdbcAdapterInternalServiceInvoker$set_connection_FS1.call(Unknown Source) at org.jruby.runtime.callback.FastInvocationCallback.execute(FastInvocationCallback.java:55) at org.jruby.internal.runtime.methods.SimpleCallbackMethod.call(SimpleCallbackMethod.java:70) at org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:158) at org.jruby.runtime.CallSite$ArgumentBoxingCallSite.call(CallSite.java:103) at org.jruby.evaluator.ASTInterpreter.fCallNode(ASTInterpreter.java:1092) at org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:345) at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:626) at org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:293) at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:168) at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:147) at org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:158) at org.jruby.runtime.CallSite$ArgumentBoxingCallSite.call(CallSite.java:76) at org.jruby.evaluator.ASTInterpreter.vcallNode(ASTInterpreter.java:1734) at org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:474) at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:626) at org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:293) at org.jruby.evaluator.ASTInterpreter.rescueNode(ASTInterpreter.java:1499) at org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:442) at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:168) I found out that there is newer version of activerecord-jdbc, which is also renamed to activerecord-jdbc-adapter. It is important to uninstall the old gem as well as install the new one, otherwise the application will not work.
A friend asked me this question today - and here is my take on it (slightly expanded) answer to his email :-):
Hi Shane
I have purchased the 8 GB because I had no choice - the 16 GB versions were sold out at the Futureshop at the time, and I was too impatient to wait for two more weeks until delivered from Apple Online store :-).
From usage perspective - whether 8 GB is enough really depends how much video you plan to put on. I am not watching too much video content other than YouTube via WiFi (which is streamed and does not take any space on the device), so for me 8 GB is enough. Main reason why I am not watching video is that I usually listen while walking or driving and one cannot walk very far while concentrating on the screen without bumping into something (I tried that). With driving it is even worse (I did NOT try this one ...). If you are willing to sit while watching, the image quality of the device is surprisingly good.
I bought the Ola Bini's eBook on JRuby and started to work through the examples. The installation of the Mongrel gem in JRuby (trunk revision 5341 fails with the following error code:
``` $ jruby -S gem install -y mongrel> INFO: `gem install -y` is now default and will be removed> INFO: use --ignore-dependencies to install only the gems you list> Building native extensions. This could take a while...> extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)> ERROR: Error installing mongrel:> ERROR: Failed to build gem native extension.[/sourcecode]> This error is logged in JIRA with id JRUBY-1771Workaround (possibly applicable for other gems is to explicitly specify the plaform:> [sourcecode language='ruby']> $ jruby -S gem install -y mongrel --platform jruby> INFO: `gem install -y` is now default and will be removed> INFO: use --ignore-dependencies to install only the gems you list> Successfully installed mongrel-1.1.2> 1 gem installed> Installing ri documentation for mongrel-1.1.2...> Installing RDoc documentation for mongrel-1.1.2... ```
I was experiencing the occasional weird behaviour on downloading large files in Leopard: the download would stall, but after stopping/restarting (which can be done in Safari and iTunes), the download would continue. It was not very consistent, and I suspected the NAT router or even Rogers - some sites were occasionally having this problem, while other sites would not.
While playing with JRuby over the weekend, this happened again and pretty much prevented the gem installation - because the multi-megabyte gem index would not download from http://gems.rubyforge.org/. Strangely enough, same download would work on Tiger, on Linux and on Windows using same router - which pretty much excluded router as a cause.
One of the most readable, original blogers out there, writing on software development practice and techniques - Joel Spolsky - published an excellent 3 part Talk at Yale: Part1, Part2 and Part3.
You will find out:
- what two computer science courses were most useful in his university studies
(one that was not really a comp-sci and one he decided to drop)
- why is it tough to be an in-house programmer
- why is the quality of many in-house systems so bad
- what is this "quality thing" anyway
- why is specification futile
in case you have not noticed - Interface21 aka SpringSource (great name change, btw) runs a blog with lots of hidden treasures inside.
Recent article describes new addition to Spring portfolio which is territory within my "watched space": enterprise integration. See the blog entry for more.
If you are in corporate space that is keen on "standards", the comparison of Spring vs EJB3 is very good article as well. Not that EJB would matter too much these days (IMHO) - but a nice read nevertheless.
The part 1 of the post is here --- continuing ---
So back again - different coffee shop (Starbucks at Carling), freshly charged battery, Grande Latte and no internet connection (which means no distractions from emails and the Web) - here we go again, part 2.
If I should single out one or two technologies that I think I have neglected and should have paid much more attention to it would be the Web trio of HTML/JavaScript/CSS as one and the SQL as second.
We are recently interviewing quite a lot in anticipation of the great things coming. It is sort of similar task as we did year and something ago, but I enjoy this round much better. This time, rather than "we have to assemble the project team ASAP", we have the luxury of longer term view and focus more on hiring the people that will be great match to the company culture, will be with us for longer period and will grow with the company.
If the world of physical objects would governed with the same rules as the Digital Millennium Copyright Act does impose on all things digital, scissors would be illegal and you could end up in jail for manufacturing, and maybe even owning or using them. Crazy ? Well, see this presentation and judge for yourself.
This "law" is currently impacting our friends south of the border only, but it is very real that it will soon become a law in Canada as well.