gh-pages -> gh-pages (non-fast forward) when creating github project page

Git No Comments »

If you get

! [rejected] gh-pages -> gh-pages (non-fast forward)

when following the instructions to create a github project page, you might just try to delete the gh-pages branch

git push origin :gh-pages

and then push the gh-pages branch again

git push origin gh-pages

Hope it helps.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Rubyonrails.org Stolen?

Uncategorized No Comments »

Here in Thailand I currently get the page below at http://www.rubyonrails.org and http://www.rubyonrails.com. The domain name registration seems to be ok, but there was an update yesterday (April 20th). And it’s a garish parking page that in the colors of Django?! Is it some regional DNS screw-up? Am I mistyping Ruby?

UpdateJust checked via US-based proxy, the issue is confirmed, it’s not a regional Asian DNS snafu.

Update 2The same happened last year and it looks like it happens every year around April 20th, April Fools + 20 or sth.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

“Delete Facebook Account” Most Popular Deletion at Google

Unspecific Ramblings No Comments »

So the most popular search term starting with “delete” seems to be “delete facebook account”. In the face of recent changes to “fan” and profile settings that “deepen the marketing graph“, it could become even more popular. Wonder what all the buzz is about…

Delete Facebook Account Google

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Learning Javascript with Crockford and Spidermonkey

JavaScript No Comments »

As JavaScript is the language I’m planning to learn more in-depth this year, primarily to approach the latest map-reduce API’s of the latests NoSQL databases (CouchDB, riak etc.), I’ve recently made good progress thanks to two invaluable resources:

Crockford Videos

First, Douglas Crockford’s lecture videos at the YUI theater. He has created three separate series, The JavaScript Programming language, Advanced JavaScript. and more recently, Crockford on JavaScript, all available on the same page in the YUI theater. The third episode (Act III) of Crockford on Javascript gives you a tour de force of functional programming and is probably the most valuable of all the videos for advanced programmers.

He also states in his first lecture that there are no good books on JavaScript, except perhaps a single one, JavaScript: The Definitive Guide By David Flannagan. You may also want to check out Crockford’s own books which I haven’t had the chance to read yet.

Finally, always use Crockford’s jslint to check your javascript code quality. It’s a great teaching tool in and of itself and will help you find all those missing semi-colons and curly braces.

Spidermonkey Command Line

Interactively checking code on the command line is standard practice in the ruby and python universes. Now you can easily have the same code checker at your fingertips with JavaScript. In Ubuntu (8.04 and higher) simply

sudo apt-get install spidermonkey-bin

, and then type

> js

to get the beautiful prompt:

js>

Here are some tips for working with the spidermonkey command line. And, to use jslint from the command line, check out this post.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

ruby-debug with Ruby 1.9.x and Rails 3 on RVM

Ruby, Ruby on Rails, Uncategorized 2 Comments »

Things are moving fast in the Rails/Ruby world with the imminent releases of Ruby 1.9.2 and Rails 3.

An essential tool for a smooth transition is RVM by Wayne Seguin (Where can i vote for this guy as Ruby Hero? Ah, it’s here.)

In the first Rails 3 Railscast RVM sounds more like an afterthought and only necessary if you don’t have Ruby 1.8.7+ installed, but it’s advisable to not even try the migration to Rails 3 without installing RVM and a dedicated version of Ruby (can be the same version as your current system Ruby).

While taking the plunge with Rails 3 and its many breaking changes, why not go all the way in a twisted pun sort of way? As Ryan Bates recommends in Railscast 208, it may be time to skip Ruby 1.9.1 and install ruby-head on RVM, which is currently 1.9.2, expected to be released in a few months.

Once you have Rails 3 (currently Beta 3) and Ruby 1.9.2 installed on RVM, perhaps with this nifty script that includes the entire starting “gemset”, you will find that the ruby-debug gem can’t be installed on Ruby 1.9.x, the installer will tell you

Can’t handle 1.9.x yet

and other stuff.

Don’t despair Mark Moseley has created all the necessary gems for you. You can install the ruby 1.9.1 and 1.9.2. compatible debugger and the debug ide with the following commands (thanks to Wayne’s exemplary documentation):

gem install ruby-debug19 — –with-ruby-include=$rvm_path/src/ruby-head/

gem install ruby-debug-ide19 — –with-ruby-include=$rvm_path/src/ruby-head/

Now when you run

rails server –debugger

it still won’t be working, saying

“You need to install ruby-debug to run the server in debugging mode.”

So, as the last step, put this in your Gemfile

gem ‘ruby-debug19′, :require => ‘ruby-debug’

Run ‘bundle install’ if you feel like it, and now the debugger should work. However, the debugger will now start every time you start the server.

To start the server without the debugger, you’ll have to uncomment the line above in the Gemfile again.

Anyone with a workaround for this please post in the comments.

Hope it helps.

P.S. Don’t forget to give back to Open Source!

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]
WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in