Monday, October 24, 2011

(local out of date) error in Git when working with branches

1. git pull origin your-branch
2. git push origin your-branch

Step 1 brings your local branch to up-to date. Step 2 pushes your changes to the remote branch.

Sunday, October 23, 2011

invalid date format in specification: gem ruby

1) Upgraded ruby gems to 1.8.11 (gem update --system)
2) gem pristine --all

No luck.

Deleted all the gemspec that were causing problems: whenever-0.6.8.gemspec etc. Then bundle install made it work.

`build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

I was getting :
Installing eventmachine (0.12.10) with native extensions .rvm/rubies/ruby-1.8.7-p330/lib/ruby/site_ruby/1.8/rubygems/installer.rb:533:in `build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

during the installation of scheduler_daemon on Mac OS Lion. Upgraded XCode via appstore (download from appstore and install) to resolve this issue.

Friday, October 07, 2011

Integrating Tweet Button in Rails App

In Rails 3.0 app:

1) In Gemfile include:

gem 'tweet-button'

2) bundle install

3) In application_helper.rb include:

module ApplicationHelper
include TweetButton

... other methods...

4) In your partial:

<%= tweet_button(:via => "CreditCardLogic", :url => polymorphic_url(article), :text => "Check this out!") %>

To see this in action, check out my credit cards site.