RailsTutorial 1.4 Deployment : Using Heroku FAIL!

Deploying to an external site.  The tutorial suggests Heroku.

This requires creating an accoutn at Heroku.

I created the account, but when trying to deploy I received this error:

An error occurred while installing sqlite3 (1.3.5), and Bundler cannot continue.
 Make sure that `gem install sqlite3 -v '1.3.5'` succeeds before bundling.
Failed to install gems via Bundler.

Detected sqlite3 gem which is not supported on Heroku.
http://devcenter.heroku.com/articles/how-do-i-use-sqlite3-for-development

I reinstalled sqlite -v 1.3.5 and it still rejected.

It turns out that Heroku does not like sqlite.  They recommended installing PostGreSQLand for teh mac an installation can be found here

However, now that that I have made it to here, I seem to have broken the git commit.  I receive this error

git commit -a
dyld: Symbol not found: __cg_jpeg_resync_to_restart
 Referenced from: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
 Expected in: /Applications/rubystack-3.2.7-0/common/lib/libJPEG.dylib
 in /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
error: mate -w died of signal 5
error: There was a problem with the editor 'mate -w'.
Please supply the message using either -m or -F option.

Ok yuck.  I am going to start again from scratch with this project and see where it breaks again.

Posted in Tutorial | Tagged , | Leave a comment

RailsTutorial: 1.3 GitHub

Working on setting up the git repository in the totorial section 1.3, I was unable to push the git project to the repository getting a

$:git push -u origin master
Permission denied (publickey).
fatal: The remote end hung up unexpectedly

After futzing around with a variety of different attempts (following the GitHub recommendations etc), I found that this link described a fix (Thank you Kurt van Gorkom!):

$:git remote rm origin
$:git remote add origin <remote url>

replace <remote url> with this information:

"git@github.com:<username>/<reponame>.git"

Otherwise the tutorial proceded flawlessly, allowing me to

  • Create a git repository
  • connect to GitHub
  • Create a branch and make a modification to the README file
  • commit the change
  • merge the branch to the main branch
  • push the changes to GitHub
Posted in Tutorial | Tagged , , , , | Leave a comment

Ruby On Rails Tutorial Michael Hartl

After realizing the difficulty of implementing my learning curve using the Head Start Rails book (v2 book: Rails is now v3), I decided to look around for other possibilities.  This book is referenced at the main Rails guides site, so I will now work through this one.

 

On first look, this is much more up to date, and goes through great lengths to discuss installation, configuration and deployment.  Examples screen shots are on the Macintosh OS (which is what I am using).

The opening chapter shows how to do an installation of rails from scratch.  Since I am using the Bitnami stack, much of this has already been done.  However, there is a good discussion regarding the installation of git (Section 1.3), then creating a repository on GitHub

 

Posted in Tutorial | Tagged , , , , | Leave a comment

HeadFirst Rails: First use of Book

I love the Head First series, for their tongue-in-cheekiness as well as the tiered approach to learning.  So I was eager to receive this book and start to go through the process with Rails.

It is important to recognize that, at least my book, is based around Rails 2, and the newest iteration of Rails is version 3!  So there are some significatn changes.  This Post will highlight things that need to be done differently.

A good post “Using Head First Rails with Rails 3.x”¬†by Tim Van Gelder¬†details the modifications required to use the book:

I also refer you to this article “Upgrading a Rails2 App to Rails3” by Rizwan Riza.

  • The Book refers to using the call “ruby script/”. ¬†this call is replaced with “rails”
  • When creating a new project must use the term “new”. ¬†so instead of “rails new_project” one needs to use “rails new new_project”
Posted in Tutorial | Tagged , , | Leave a comment

SQLite Database manager

Rails defaults to using the SQLite database.  In order to access this database directly, there is a plugin that can do this from within Firefox, called (appropriately enough) sqlite_manager.  It can be obtained here:

Posted in Uncategorized | Tagged , , | Leave a comment

Tk –

“Tk is the only cross-platform (Windows, Mac, Unix) graphical user interface toolkit designed exclusively for high-level dynamic languages, like Tcl, Ruby, Perl, Python and many others. Whatever language you use, this site brings you the current, high-quality essential information you need to get the most out of Tk.”

Installation of Tk here:

 

Active Tcl User Guide

Posted in Uncategorized | Leave a comment

TextMate – TMTools

“The¬†TMTOOLS¬†plug-in is a conglomeration of shell commands which provide the user with advanced functionality to interact with TextMate.”

Information here:

Download git for osx

mate : allows command line access to TextMate.

RubyAmp how to install here

Note TextMate is an editor, NOT an IDE.  So it does not have method autocomplete for example.  This may be a problem.

Posted in Uncategorized | Tagged , , | Leave a comment

TextMate: Interactive support fix for Snow Leopard

It appears that in the Ruby download, a configuration issue with Snow Leopard (OSX 10.6.x) ¬†causes the ability to use the standard input (‘gets’) to break. ¬†As long as you are running the script from the terminal then it will accept keyboard input appropriately, but using the CMD-R feature in TextMate does not.

There is a published fix that involves updating the interactive input library.

You can get the library here: (github).  This needs to be placed into the

/Applications/TextMate.app/Contents/SharedSupport/Support/lib

directory.  I did this and voila!

Posted in Uncategorized | Tagged , , | Leave a comment

TextMate 3: useful links and ideas for Ruby

TextMate Shortcuts¬†szeryf’s list of very useful keyboard shortcuts

RubyAmp a TextMate Bundle that adds lots of functionality for Ruby code development

Posted in Uncategorized | Tagged , | Leave a comment

TextMate 2

At first glance, I like this environment.

There are a lot of autocomplete functions, and many ways to program additional ones or create snippets.  Cmd-R runs the environment.  I have not yet tried multi-file projects, but, if the rest of it holds up to what I am first seeing then this looks as if it will be a great way to go.  I also noted there is a Rails bundle, so more to look at!

Posted in Uncategorized | Tagged , , | Leave a comment