Posts tagged Ruby
For Freelancers
This is a response to an email I received yesterday. I am trying to reduce the number of times I say things by just blogging about them.
This is my straightforward response to someone with a Master in Computer Science from India regarding his query about career prospects in Ruby on Rails and how to start as a freelancer.
Continue reading »How to test devise features with Cucumber
Updated the Devise wiki page on "How To: Test with Cucumber" on github. Following the guide should work.
Continue reading »Testing Some Devise Features With RSpec, Steak and Email Spec
Having spent hours writing cucumber tests and finding out that it all doesn't work with Rails 3.1 RC5 is frustrating. It disrupts the flow of things. In my mind all I wanted was to move on to focus on new features. Not being able to write tests for the new features because of incompatibility issues is just hell. That's the only reason why I started using Steak yesterday for acceptance tests.
Continue reading »Using Fog For Amazon Cloudfront
There are a lot of ways to set up a CDN and you don't even need to be a programmer to do so. Cyberduck seems to have worked for some people.
Continue reading »Timeline Fu
Realized nearly all of my projects involved logging user actions and having news feeds similar to Facebook. Two years ago, it didn't seem sensible to use a gem for just that because all you need is to create a module and helpers to log actions (on your model of course). A common mistake is adding code for logging actions, sending emails on controllers. Sometimes when you are young, you do stupid things.
Continue reading »Don't Forget Ruby's Send Method
First of all thank you for reading. Thanks to those who thanked me for blogging. Been very busy and hardly found time to blog.
In the past few years, Ruby's send method saved me from having to write several lines of code. Don't you ever forget about it.
Continue reading »What You Should Know Before You Upgrade Your Rails 3 App To Rails 3.1 Beta
This is based on both research and experience.
I upgraded a Rails 3 app to Rails 3.1.
There were many issues. But they aren't much compared to the benefits you'd get from using the latest version. Rails 3.1 takes away a lot of pain. Instead of using asset packager, having sprockets makes it so much easier to deploy an optimized application. Not all frameworks have this. In fact it hasn't been a practice of certain developers to make sure that a single file is loaded for javascript in production and a single is loaded for stylesheet in production. Reversible migrations is another cool thing. Also read that there is no need to add ":multipart=>true" on a form if you use the file field.
Continue reading »How To Install CoffeeScript On Mac OS X
If you are a Rails developer, you should know that Rails 3.1 beta has been released today. I am trying out the beta version so I don't have to stress about migrating or upgrading later.
Install CofeeScript Using Homebrew
Continue reading »How to Import Contacts From Yahoo or Google Using Ruby
I came across this tutorial on how to import contacts from Gmail, Yahoo or Hotmail.
Continue reading »How To Retrieve Facebook Comments Using Ruby and Koala
I have used fb_graph gem but found it insufficient. There are several Ruby gems for facebook by the way. I suggest using koala. Koala supports OAuth, REST API and the recommended Graph API.
Add the gem on your Gemfile if you are using Rails 3 or Sinatra with bundler.
Continue reading »Railsjam Volunteers
Hi everyone. This is yet another call for help. We are looking for volunteers who would work on the Rails 3 application, Railsjam.net. There are many changes (features and interface changes) which I have not yet committed. Given time and after writing a few more tests, I will commit all these changes. Hopefully by January 14, 2011, I have most of the changes committed.
Continue reading »Using Bundler for Sinatra Applications On A Shared Host
Before I talk about how I got my Sinatra blog working, I want to rant. I am using Sinatra 1.0 with Bundler gem for managing dependencies.
My awful host (Dreamhost) just messed up again. Though I am aware shared hosts are not liable for issues that happen to your application when they upgrade dependencies, I am still disappointed by its inability to support any Ruby framework well.
Continue reading »Package Assets For Rails 3 and Upload to Amazon s3
I like to share this quickly for those who are concerned about application performance. Rails has always provided a way to cache assets. It's been very simple but when we think about the "cloud" and scaling, we realized it's a pain to actually make it all work with amazon s3.
Continue reading »Capistrano Task For Importing Remotely Hosted Assets to Local Directory
This is related to my post about using Capistrano to retrieve the a database from a remote host and import to local database.
Continue reading »Install RVM, Passenger, Nginx and Rails 3 on Ubuntu Lucid Lynx
This has been a problem encountered by several developers including myself:
Getting RVM, Passenger and Rails3 to work
Here's a quick and short post. Supposing you already have updated Ubuntu and have Ruby installed.
Continue reading »Rails 3 Upgrade Resources
Many of us have several existing 2.x applications and would want to upgrade without pulling our hair because we can't figure out something or we are wary of consuming too much time. I'm about to post several links where you could find useful advice on upgrading Rails 3. Feel free to share other links if you know some.
Continue reading »Syntax Highlighting for Ruby
There are more than couple of ways to do syntax highlighting for Ruby code. Your geek blog doesn't look nice if the code cannot be read properly or cannot be copied easily. Gists work well. Most blogs now would probably just use gist.github.com especially if it's lengthly file or there are way to many stuff on it that you don't want to scare your visitors. By naming the file "syntax.rb" on gist.github.com for instance, it would know what code you are using and syntax highlighting will be based on the filename. See syntax.rb .
Continue reading »How to Get Amazon Data Using Ruby
This is post is inspired by several posts of Greg Moreno on RubyonCloud. Check out the site.
Install the Amazon ECS gem. If you're already using Amazon s3 gem, you don't need to create a new config/yaml file.
Continue reading »Command aliases for Subversion, Git and Rails
I got a Peepcode unlimited last year which came with a nice video about the command line. Check it out.
Not too many people will find this interesting. For me, it's something I just want to do for myself (and for those I'd work for if I'm still employed).
Continue reading »Sinatra Gems and Frameworks You Should Know About
The godfather of Sinatra. Those who like Rails will probably want to start with Padrino rather than just bare-bones Sinatra DSL. Check out the blog tutorial.
Continue reading »