tag:blogger.com,1999:blog-14767686145248755152024-02-19T22:55:09.454-08:00Tom's Ville 2.0Random notes in areas of open source technologies and coming age of Web 2.0 and Mobile computing.Tom's Villehttp://www.blogger.com/profile/01953344137289597366noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-1476768614524875515.post-18918618357631832412007-10-05T10:22:00.000-07:002007-10-05T10:43:29.550-07:00Free(limited time only) Rails book from SitePoint<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://sitepointstatic.com/images/books/rails1/bookshot-2.png"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 200px;" src="http://sitepointstatic.com/images/books/rails1/bookshot-2.png" alt="" border="0" /></a><br /><br /><span class="down" style="display: block;" id="formatbar_CreateLink" title="Link" onmouseover="ButtonHoverOn(this);" onmouseout="ButtonHoverOff(this);" onmouseup="" onmousedown="CheckFormatting(event);FormatbarButton('richeditorframe', this, 8);ButtonMouseDown(this);"></span><br /><a href="http://www.rubyinside.com/">Peter Cooper</a> first wrote this <a href="http://www.rubyinside.com/build-your-own-ruby-on-rails-applications-pdf-available-for-free-617.html">promotion deal</a>. I'd seen <a href="http://www.rubyrailways.com/53/">another good review</a> of this book before, so I downloaded a PDF copy from <a href="http://www.sitepoint.com/books/rails1/freebook.php">here</a>. Will read it to see how it compares with other Rails books.<br /><br />As of this writing(Oct. 5, 2007), the clock is ticking(57 days left) for the promotion deal.Tom's Villehttp://www.blogger.com/profile/01953344137289597366noreply@blogger.com0tag:blogger.com,1999:blog-1476768614524875515.post-77431890166995110412007-10-05T09:43:00.000-07:002007-10-05T10:17:37.663-07:00Apress books 50% on sale at Bookpool<a href="http://www.bookpool.com/"><span class="blsp-spelling-error" id="SPELLING_ERROR_0">Bookpool</span></a> is running a 50% sale for books from <a href="http://www.apress.com/"><span class="blsp-spelling-error" id="SPELLING_ERROR_1">Apress</span></a> and <a href="http://www.friendsofed.com/"><span class="blsp-spelling-error" id="SPELLING_ERROR_2">FriendsOfEd</span></a>.<br /><br />It's probably a good chance to snatch up some of their latest open source books. I also noticed <span class="blsp-spelling-error" id="SPELLING_ERROR_3">a lot</span> of new Rails books that are scheduled to be released later this year or earlier next year are on sale too.<br /><br /><a href="http://www.apress.com/"><span class="blsp-spelling-error" id="SPELLING_ERROR_4">Apress</span></a> had impressed me lately with their timely publish of books on cutting edge web technologies and their focus in the open source arena. Also most of their books tend to be practical and easy to read, but the downside is that the contents are likely to become out dated soon, though it has a lot to do with the fast changing of the targeted technology topics. One of my old favorite, <a href="http://www.oreilly.com/"><span class="blsp-spelling-error" id="SPELLING_ERROR_5">O'Reilly</span></a>, had <span class="blsp-spelling-corrected" id="SPELLING_ERROR_6">gradually</span> become the opposite, where their coverage of new technologies tend to arrive some what late(just look at their book publishing dates on <a href="http://www.ruby-lang.org/en/">Ruby</a> and <a href="http://www.rubyonrails.org/">Ruby on Rails</a> relative to other publishers), but I have to admit their books' contents quality is still top notch and I always turn to their books for references and ones will be kept in my library in longest time.Tom's Villehttp://www.blogger.com/profile/01953344137289597366noreply@blogger.com0tag:blogger.com,1999:blog-1476768614524875515.post-57632589622137232172007-09-18T22:42:00.000-07:002007-09-18T23:10:07.822-07:00Missing libstdc++.so.5 on FedoraCore 7<span style="font-family:arial;">While installing the latest <a href="http://www.mozilla.com/en-US/firefox/">Firefox</a> and <a href="http://http://java.sun.com/javase/downloads/index.jsp">Java 6</a> on a newly installed</span><br /><span style="font-family:arial;"><a href="http://fedoraproject.org/">Fedora Core 7</a> box, I encountered the following error, here is the</span><br /><span style="font-family:arial;">one received while unpacking the Java EE 5 SDK Update 3 for Linux,</span><br /><pre><br /><span style="color: rgb(0, 0, 102);font-family:courier new;" ># ./java_ee_sdk-5_03-linux.bin</span><br /><span style="color: rgb(0, 0, 102);font-family:courier new;" >./java_ee_sdk-5_03-linux.bin: error while loading shared libraries:</span><br /><span style="color: rgb(0, 0, 102);font-family:courier new;" >libstdc++.so.5: cannot open shared object file: No such file or directory</span><br /><span style="font-family:courier new,mon;">#</span><br /></pre><span style="font-family:arial;">Looking a little deeper into the GCC coming with the FC7,</span><br /><pre><br /><span style="color: rgb(0, 0, 102);font-family:arial;" ># file /usr/bin/gcc</span><br /><span style="color: rgb(0, 0, 102);font-family:arial;" >/usr/bin/gcc: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),</span><br /><span style="color: rgb(0, 0, 102);font-family:arial;" >dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped</span><br /><span style="color: rgb(0, 0, 102);font-family:arial;" >#</span><br /></pre><br /><span style="font-family:arial;">And now with the Java binary,</span><br /><pre><br /><span style="color: rgb(0, 0, 102);font-family:arial;" ># file java_ee_sdk-5_03-linux.bin</span><br /><pre><span style="color: rgb(0, 0, 102);font-family:arial;" >java_ee_sdk-5_03-linux.bin: ELF 32-bit LSB executable, Intel 80386, version 1</span><br /><span style="color: rgb(0, 0, 102);font-family:arial;" >(SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.2.5, not</span><br /><span style="color: rgb(0, 0, 102);font-family:arial;" >stripped</span><br /><span style="color: rgb(0, 0, 102);font-family:arial;" >#</span><br /></pre><span style="font-weight: bold;font-family:arial;" >It looks like the Java file was compiled with an older GCC.</span><br /><span style="font-weight: bold;font-family:arial;" >Let's see what C/C++ library FC7 provides:</span><br /><pre><span style="color: rgb(0, 0, 102);font-family:arial;" ># ls /usr/lib/libstdc*</span><br /><span style="color: rgb(0, 0, 102);font-family:arial;" > 4 /usr/lib/libstdc++.so.6@ 924 /usr/lib/libstdc++.so.6.0.8*</span><br /><span style="color: rgb(0, 0, 102);font-family:arial;" >#</span><br /></pre><span style="font-weight: bold;font-family:arial;" >By running a yum search, we found that there is a compatibility</span><br /><span style="font-weight: bold;font-family:arial;" >library available for the older GCC:</span><br /><pre><span style="color: rgb(0, 0, 102);font-family:arial;" ># yum search libstdc++</span><br /><span style="color: rgb(0, 0, 102);font-family:arial;" >Loading "installonlyn" plugin</span><br /><br /><br /><span style="color: rgb(0, 0, 102);font-family:arial;" >compat-libstdc++-33.i386 3.2.3-61 fedora</span><br /><span style="color: rgb(0, 0, 102);font-family:arial;" >Matched from:</span><br /><span style="color: rgb(0, 0, 102);font-family:arial;" >compat-libstdc++-33</span><br /><span style="color: rgb(0, 0, 102);font-family:arial;" >The compat-libstdc++ package contains compatibility standard C++ library</span><br /><span style="color: rgb(0, 0, 102);font-family:arial;" >from GCC 3.3.4.</span><br /><br /><span style="color: rgb(0, 0, 102);font-family:arial;" >...</span><br /><span style="color: rgb(0, 0, 102);font-family:arial;" >#</span><br /></pre><span style="font-weight: bold;font-family:arial;" >Let's install it,</span><br /><pre><span style="color: rgb(0, 0, 102);font-family:arial;" ># yum install compat-libstdc++-33</span><br /><span style="color: rgb(0, 0, 102);font-family:arial;" >...</span><br /><span style="color: rgb(0, 0, 102);font-family:arial;" >=============================================================================</span><br /><span style="color: rgb(0, 0, 102);font-family:arial;" > Package Arch Version Repository Size</span><br /><span style="color: rgb(0, 0, 102);font-family:arial;" >=============================================================================</span><br /><span style="color: rgb(0, 0, 102);font-family:arial;" >Installing:</span><br /><span style="color: rgb(0, 0, 102);font-family:arial;" > compat-libstdc++-33 i386 3.2.3-61 fedora 232 k</span><br /><br /><span style="color: rgb(0, 0, 102);font-family:arial;" >...</span><br /><span style="color: rgb(0, 0, 102);font-family:arial;" >...</span><br /><span style="color: rgb(0, 0, 102);font-family:arial;" >Running Transaction</span><br /><span style="color: rgb(0, 0, 102);font-family:arial;" > Installing: compat-libstdc++-33 ######################### [1/1]</span><br /><br /><span style="color: rgb(0, 0, 102);font-family:arial;" >Installed: compat-libstdc++-33.i386 0:3.2.3-61</span><br /><span style="color: rgb(0, 0, 102);font-family:arial;" >Complete!</span><br /><span style="color: rgb(0, 0, 102);font-family:arial;" >#</span><br /><br /><span style="font-weight: bold;font-family:arial;" >Now the missing library can be seen on the system,</span><br /><br /><span style="color: rgb(0, 0, 102);font-family:arial;" ># ls /usr/lib/libstdc*</span><br /><span style="color: rgb(0, 0, 102);font-family:arial;" > 0 /usr/lib/libstdc++.so.5@ 4 /usr/lib/libstdc++.so.6@</span><br /><span style="color: rgb(0, 0, 102);font-family:arial;" >724 /usr/lib/libstdc++.so.5.0.7* 924 /usr/lib/libstdc++.so.6.0.8*</span><br /><span style="color: rgb(0, 0, 102);font-family:arial;" >#</span><br /></pre><span style="font-weight: bold;font-family:arial;" >And next to run the Java install and Firefox again, both programs worked.</span><br /><br /></pre>Tom's Villehttp://www.blogger.com/profile/01953344137289597366noreply@blogger.com0tag:blogger.com,1999:blog-1476768614524875515.post-63633025370512615552007-09-18T15:27:00.000-07:002007-09-19T09:00:28.768-07:00Install Ruby On Rails on Fedora Core 7<span style="font-family:arial;">Here are the steps to install <a href="http://www.rubyonrails.org/">Rails</a> on a newly installed <a href="http://fedoraproject.org/"><span style="text-decoration: underline;">Fedora Core 7(FC7)</span></a><br /><br /><span style="font-weight: bold;">Step 1. Install Ruby </span><br /><br />First we need to install <a href="http://www.ruby-lang.org/en/">Ruby</a> related packages to the <span class="blsp-spelling-error" id="SPELLING_ERROR_0">FC</span>7.<br /><br /></span><div style="text-align: justify;"><span style="font-family:arial;"><span style="font-style: italic;"> If you've selected Ruby software package during the <span class="blsp-spelling-error" id="SPELLING_ERROR_1">FC</span>7 installation,</span></span><br /><span style="font-family:arial;"><span style="font-style: italic;"> the installed version is already old. The installed version from</span></span><br /><span style="font-family:arial;"><span style="font-style: italic;"> the <span class="blsp-spelling-error" id="SPELLING_ERROR_2">FC</span>7 is something like 1.8.6-2 and to a yum search showing that</span></span><br /><span style="font-family:arial;"><span style="font-style: italic;"> there is already updates for 1.8.6.36-3. Thus it may be easier to</span></span><br /><span style="font-family:arial;"><span style="font-style: italic;"> simply install Ruby manually(as shown below) after the <span class="blsp-spelling-error" id="SPELLING_ERROR_3">FC</span>7 install,</span></span><br /><span style="font-family:arial;"><span style="font-style: italic;"> if you like to start with the latest of the software.</span></span><br /><span style="font-family:arial;"></span></div><span style="font-family:arial;"><br />If you start with a freshly installed <span class="blsp-spelling-error" id="SPELLING_ERROR_4">FC</span>7 or this is the first time<br />you run yum on the system, you may need to run the following to<br />set up the yum:<br /><br /><span style="color: rgb(0, 0, 102);font-family:courier new;" >$ yum <span class="blsp-spelling-error" id="SPELLING_ERROR_5">grouplist</span></span><br /><br />Next, you need to become the root:<br /><br /><span style="font-family:courier new;"> </span><span style="color: rgb(0, 0, 102);font-family:courier new;" >$ <span class="blsp-spelling-error" id="SPELLING_ERROR_6">su</span> -</span><br /><br />Install the following <a href="http://www.ruby-lang.org/en/">Ruby</a> related packages that are essential for<br />anyone who likes to do development in Ruby:<br /><br /><span style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 102);font-family:courier new;" ># yum install ruby ruby-libs ruby-<span class="blsp-spelling-error" id="SPELLING_ERROR_7">devel</span> ruby-<span class="blsp-spelling-error" id="SPELLING_ERROR_8">irb</span> ruby-<span class="blsp-spelling-error" id="SPELLING_ERROR_9">ri</span> ruby-<span class="blsp-spelling-error" id="SPELLING_ERROR_10">rdoc</span> ruby-docs</span> </span><br /><br />Depends on type of the applications, here are few more useful packages:<br /><br /><span style="color: rgb(0, 0, 102);"># yum install <span class="blsp-spelling-error" id="SPELLING_ERROR_11">eruby</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_12">eruby</span>-libs <span class="blsp-spelling-error" id="SPELLING_ERROR_13">eruby</span>-<span class="blsp-spelling-error" id="SPELLING_ERROR_14">devel</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_15">bsf</span> ruby-<span class="blsp-spelling-error" id="SPELLING_ERROR_16">tcltk</span></span><br /><br /><br /><span style="font-weight: bold;">Step 1.1. Manually compile Ruby<br /><br /></span>If you like to compile the Ruby by hand, here are the steps, run as root:<br /><br /><span style="color: rgb(0, 0, 102); font-family: courier new;"># wget </span><a style="color: rgb(0, 0, 102); font-family: courier new;" href="ftp://ftp.ruby-lang.org/pub/ruby/ruby-1.8.6.tar.gz">ftp://ftp.ruby-lang.org/pub/ruby/ruby-1.8.6.tar.gz</a><br /><span style="color: rgb(0, 0, 102); font-family: courier new;"># cd /tmp</span><br /><span style="color: rgb(0, 0, 102); font-family: courier new;"># tar zxf ruby-1.8.6.tar.gz</span><br /><span style="color: rgb(0, 0, 102); font-family: courier new;"># cd ruby-1.8.6</span><br /><span style="color: rgb(0, 0, 102); font-family: courier new;"># ./configure --prefix=/usr</span><br /><span style="color: rgb(0, 0, 102); font-family: courier new;"># make</span><br /><span style="color: rgb(0, 0, 102); font-family: courier new;"># make test</span><br /><span style="color: rgb(0, 0, 102); font-family: courier new;"># make install</span><br /><br /><span style="font-weight: bold;"><br /></span><br /><span style="font-weight: bold;">Step 2. Install MySQL</span><br /><br />If you haven't selected <a href="http://mysql.org/">MySQL</a> during <span class="blsp-spelling-error" id="SPELLING_ERROR_17">FC</span>7 installation, you need to<br />do it here:<br /><br /><span style="color: rgb(0, 0, 102);font-family:courier new;" ># yum install <span class="blsp-spelling-error" id="SPELLING_ERROR_18">mysql</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_19">mysql</span>-<span class="blsp-spelling-error" id="SPELLING_ERROR_20">devel</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_21">mysql</span>-server</span><br /><br /><span style="font-weight: bold;">Step 3. Install <span class="blsp-spelling-error" id="SPELLING_ERROR_22">RubyGems</span></span><br /><br />It is recommended to install Rails from <a href="http://www.rubygems.org/"><span class="blsp-spelling-error" id="SPELLING_ERROR_23">RubyGems</span></a>. The latest<br /><span class="blsp-spelling-error" id="SPELLING_ERROR_24">RubyGems</span> as of this writing can be downloaded as follows:<br /><br /><span style="color: rgb(0, 0, 102);font-family:courier new;" ># <span class="blsp-spelling-error" id="SPELLING_ERROR_25">wget </span><a href="http://rubyforge.org/frs/download.php/20989/rubygems-0.9.4.tgz">http://rubyforge.org/frs/download.php/20989/rubygems-0.9.4.tgz</a></span><a href="http://rubyforge.org/frs/download.php/20989/rubygems-0.9.4.tgz"><br /></a><br />Move the downloaded file to, say, /opt, unzip and install:<br /><br /><span style="color: rgb(0, 0, 102);font-family:courier new;" > # <span class="blsp-spelling-error" id="SPELLING_ERROR_26">mv</span> rubygems-0.9.4.tgz /opt/</span><br /><span style="color: rgb(0, 0, 102);font-family:courier new;" > # <span class="blsp-spelling-error" id="SPELLING_ERROR_27">cd</span> /opt</span><br /><span style="color: rgb(0, 0, 102);font-family:courier new;" > # tar <span class="blsp-spelling-error" id="SPELLING_ERROR_28">xvfz</span> rubygems-0.9.4.tgz</span><br /><span style="color: rgb(0, 0, 102);font-family:courier new;" > # <span class="blsp-spelling-error" id="SPELLING_ERROR_29">cd</span> rubygems-0.9.4</span><br /><span style="color: rgb(0, 0, 102);font-family:courier new;" > # ruby setup.<span class="blsp-spelling-error" id="SPELLING_ERROR_30">rb</span></span><br /><br /><span style="font-weight: bold;">Step 4. Install Rails </span><br /><br /><span style="color: rgb(0, 0, 102);font-family:courier new;" ># gem install rails --include-dependencies</span><br /><br />Sometime the first install will fail with error such as<br />failed to find the package, just try run the install again.<br /><br />Setup MySQL and Install Rails MySQL interface<br /><br />Normally you will need a MySQL root user:<br /><br /><span style="color: rgb(0, 0, 102);font-family:courier new;" > # service <span class="blsp-spelling-error" id="SPELLING_ERROR_31">mysqld</span> restart</span><br /><span style="color: rgb(0, 0, 102);font-family:courier new;" > # <span class="blsp-spelling-error" id="SPELLING_ERROR_32">mysqladmin</span> -u root password 'your-<span class="blsp-spelling-error" id="SPELLING_ERROR_33">mysql</span>-root-password'</span><br /><br />Here is the standard install of MySQL interface library for Rails:<br /><br /><span style="color: rgb(0, 0, 102);"># gem install <span class="blsp-spelling-error" id="SPELLING_ERROR_34">mysql</span> -- --with-<span class="blsp-spelling-error" id="SPELLING_ERROR_35">mysql</span>-<span class="blsp-spelling-error" id="SPELLING_ERROR_36">config</span>=/<span class="blsp-spelling-error" id="SPELLING_ERROR_37">usr</span>/bin/<span class="blsp-spelling-error" id="SPELLING_ERROR_38">mysql</span>_<span class="blsp-spelling-error" id="SPELLING_ERROR_39">config</span></span><br /><br /><br /><span style="font-weight: bold;">Step 5. Rails test</span><br /><br />To verify the Rails installed correctly, simply create a skeleton<br />test in a local directory:<br /><br /><span style="color: rgb(0, 0, 102);font-family:courier new;" > # rails test</span><br /><span style="color: rgb(0, 0, 102);font-family:courier new;" > # <span class="blsp-spelling-error" id="SPELLING_ERROR_40">cd</span> test</span><br /><span style="color: rgb(0, 0, 102);font-family:courier new;" > # ruby script/server</span><br /><br />And then point your browser to:<br /><br /><a href="http://localhost:3000/"><span style="color: rgb(0, 0, 102);font-family:courier new;" >http://localhost:3000/</span></a><br /><br />If you see a Rails welcome page, then everything should have been<br />set up successfully.<br /><br /></span>Tom's Villehttp://www.blogger.com/profile/01953344137289597366noreply@blogger.com3