Posts tagged Ruby

Flipped the switch.

May 29, 2014, 1:32 a.m. Jekyll , Ruby , GAE , Python , Django

Finally. Wordpress has been switched off, as I have threatened to do so many times before. This blog post is being written with the aid of a home made blogging system running on Google App Engine (python). The data is stored in NDB and the editor is CKeditor, and the comments are powered by Disqus. ...

Jekyll finishing up

Feb. 22, 2013, 11:23 a.m. jekyll , Ruby , Wordpress

So it's been an eventful journey; after deciding to do away with wordpress (this time for real), I started looking at static blog generators with Jekyll being the very first. Thereafter I investigated Hyde, Mynt, Punch, Pelican and a few other as well. All of them had their pros and cons but in the ...

Ruby Symbols

May 14, 2012, 7:28 a.m. Ruby

In my learn Ruby in 48 hours project, I left one black box unopened, Now I am attacking it with a hammer and chisel. It's those tiny little ':' symbols scattered all over ruby code that's bugging me. You find them in many different tutorials and books with little or no explaination.Sample codes that ...

Iterators and Generators and Yields

May 12, 2012, 3:04 a.m. Python , Ruby , Threads , Yield

Both python and ruby have a yield which is thoroughly confusing to Java programmers and looks like the stuff that nightmares are made of. But eventually you realize that it isn't so bad after all. But before we deal with our nightmares, we to look at iterators.Python for loops look so nifty thanks t ...

Python functions

May 8, 2012, 3:59 p.m. Python , Ruby , vargs

We've already taken quick glance at python functions elsewhere, and know that they are created with the def keyword, can have default parameters and which part of the code belongs to the function is identified by it's indentation level When using default parameters, the PHP approach is that you nee ...

Django

May 3, 2012, 7:25 a.m. Django , Python , ROR , Ruby , Zope

On thursday morning I set out to learn python and by saturday morning I had read through the official tutorial on the python website as well as gone on numerous side trips on additional references. Blog posts are still paying catch up. You will not find me writing a killer python app in a few days b ...

Python Collections

April 29, 2012, 6:41 a.m. Map , Python , Reduce , Ruby

Lists and Arrays. Correct me if I am wrong here but lists in python are what everyone else calls arrays right? Check this out: a = ['spam', 'eggs', 100, 1234] That's an example for a list given in the python docs. But that's how most other languages define an array. Getting an array list slice is ...

Python in 48 hours

April 28, 2012, 5:27 a.m. Python , Ruby

Spurred on by my recent success in quickly learning ruby,  I am about to embark on a (crash) course on python. Consider the following to be my study note. It may or may not be useful to you. If you are coming from a PHP, Java or C background it's perhaps more likely to be of use. Anyway, let's get s ...

Ruby vs Python

April 27, 2012, 9:17 a.m. Django , Python , religion , ROR , Ruby

Ruby and Python have been around for a long time almost as long as Java and PHP hang on a second, Python is older than java.  Both PHP and Java are decidely on the decline and according to the fan boys both Ruby and Python are on the ascendancy. But that's not exactly consistent with what Google Tre ...

Ruby DBI

April 23, 2012, 11:01 a.m. DBI , mysql , Ruby

This is another left over post from my learn ruby project. Ran into trouble while learning how to use databases with Ruby. test.rb:1:in `require': no such file to load -- dbi (LoadError) from test.rb:1   Tried to do the obvious thing, which is yum install ruby-dbi without any luck. Next tried ...

Ruby Rails - Could not find a JavaScript runtime

April 21, 2012, 1:22 p.m. JavaScript , Ruby , virtualization

I recently had a series of posts on learing Ruby in less than 48 hours. I managed to do so in spite of running into considerable issues with installation of Ruby or various Gems. But those issues are nothing in comparison to the stumbling blocks and pitfalls the RoR trail.  In the end what worked wa ...

Ruby on Rails in a day.

April 19, 2012, 12:39 a.m. blackbox , ROR , Ruby , Scaffold , sqlite

Having set my self a goal of learning Ruby in a day and managing to achieve it with in 48 hours, i've set myself a new goal, learnings Ruby on Rails in a day. I chose to follow the  Ruby on Rails tutorial book at around 7:11 AM on monday but ran into many issues with RoR installation/setup that the ...

Ruby Rails and Sqlite

April 18, 2012, 3:32 a.m. ROR , Ruby , sqlite

When trying to create my first rails app, well it's not my first rails app, I am just trying out the examples in the Ruby on Rails Tutorial Book. this is what I got: Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/sqlite3-1.3.5 for inspection. Results logged to /usr/lib/ruby/gems/1.8 ...

Ruby classes reloaded

April 16, 2012, 7:36 a.m. Ruby

Whilst learning Ruby with the help of the Humble Little Ruby Book, I needed to do a little bit of extra reading to get a clear picture on classes and objects. This a study note made from that. write, << and puts all expect objects that are strings or can be converted to strings (object that h ...

Learn Ruby in just under 48 hours

April 15, 2012, 2:27 a.m. ROR , Ruby

So the learn Ruby in a day project has been transformed into Learn Ruby in 48 Hours. I sure hope it does not eventually end up being Learn Ruby in a week, so let's get down to business quickly.   Databases. This is where I got stuck the last time, partially because of a difficulty in setting ...

Learn Ruby in 48 Hours

April 14, 2012, 3:31 p.m. Ruby

The plan was to finish reading Humble Little Ruby Book within one day, but that didn't quite work out, so the Learn Ruby in a day project, became the Learn Ruby in 24 hours project. Now it's officially been rename to Learn Ruby in 48 hours.  What's my excuse? Did you know that yesterday Sri Lankan n ...

Learn Ruby in 24 hours

April 14, 2012, 2:42 a.m. Ruby

Continuing live coverage of my attempt to learn Ruby in a day. Well the day had only 53 minutes left when I started this post. Thus the project name is here by changed to learn ruby in 24 hours out of necessity.  By the way, is there a book by that title? What I am reading though is Mr Neighbourly's ...

Learning Ruby in a Day

April 13, 2012, 5:36 p.m. religion , Ruby , Wordpress

I've made two previous attempts and learning Ruby and both attempts were total failures. This time I was determined to succeed and set myself a rather lofty goal of learning it in a day. Reading the Humble Little Ruby Book seemed like the way to go.  It's very generous of Jeremy McAnally to make thi ...

Ruby on Rails and Fedora.

April 30, 2006, 8:38 a.m. lighttpd , ROR , Ruby

Ruby should be made to ride the rails but having got the bit between my teeth, I wanted to see it to completion, that is I wanted to install ruby on rails and write something more substantial than a hello world, to see if this is anything more than just hype.Installing Ruby on Rails means having to ...