BlueHost login to your ssh account without typing in a password

The following will hold true for being able to avoid typing in your password to get into any ssh account, assuming there is no firewall blockage. First make sure your public key exists. Look in your ~/.ssh/ If you see id_rsa.pub, it exists. If your public key doesn’t exist, you have to create it. You […]

Set up a Rails project on BlueHost

Here are advantages to using BlueHost, in my opinion, for your RoR (Ruby on Rails) projects. However, you may have to do some of your own research sometimes, but I’ve been posting BlueHost related BlueHost How-Tos. Keep in mind that BlueHost support is not just focused on hosting Rails projects. Even still, I highly recommend […]

ezcrypto – ruby gem for encrypting and decrypting

ezcrypto is a Ruby wrapper around the openssl library which allows you to encrypt and decipher text. You can install ezcrypto as a gem. Installing ezcrypto as a gem ezcrypto sample code Contents of file encrypt.rb: Output: ezcrypto documentation Covers class EzCrypto::Key and methods List of Supported openssl Ciphers:

Adding or Installing Gems

See what gems you have installed on your machine To see a list of gem commands To install a gem To Search your Local Gems by providing a search term that’s part of the Gem name To Search Remote Repositories for Gems by providing a search term that’s part of the Gem name To list […]

Deploying a Rails App, with Git and Capistrano on BlueHost

Here I’ll make an attempt to describe how to create a rails app from scratch on your local machine, configure a private Git repository on BlueHost and use Capistrano to deploy the latest code from the private shared Git repository. Almost all of the steps below work, except I’m still unable to deploy the code […]

Scriptaculous Effect.BlindUp and Effect.BlindDown

Here is an example sample code which demonstrates how to use Scriptaculous’ Effect.BlindUp and Effect.BlindDown in your Rails application to show and hide a section of your HTML. For example, let’s assume you want to hide some details and only show them if the user wants to see those details. These details are placed in […]

Rails Partial Templates

What is a Partial Template? A partial template is really just like any other template but can take parameters. These can also be called ‘partials’. If you pass in an instance of one model, it will be rendered once; If you pass into it a collection of records of model instances, it will be rendered […]

Git Commands Adding, Committing and Branching Cheatsheet

Here are a list of Git commands I want to remember for myself, mainly but I highly recommend that you bookmark this for future reference. Email yourself and friends the URL if you have to. I’ve come back to it multiple times myself. :) Store Your Name and Email for Commit Messages The following allows […]

Ruby Blocks

What is a block? A block allows you to pass another function to a function (method) as an argument. A block can only be passed in as a method argument. A block is a nameless function. Lambda method The lambda method is defined in Kernel module and returns a Proc object. A block can be […]

Choosing and Freezing a Rails Version

If you want to see what versions of Rails you have installed If you want to install a version of Rails you don’t already have installed (assuming 2.2.3 is the version you don’t have installed) If you want to start up your Rails app with a specific version (assumes you want to start up version […]