Getting Objective Resource Working with SDK 4.2

I cloned Objective Resource from the yfactorial ObjectiveResource github repository, initialized the git submodules, and tried building it under the SDK for 4.2.

I ran into two problems when trying to build. First, it complained about not knowing where the SDK was. To remedy this, I went to Project -> Edit Project Settings -> Build -> Base SDK, and changed it to latest. It was originally looking for the 3.0 SDK, which wasn’t installed on my machine.

Next, it complained with the following errors:

: error: CFBundleIdentifier ‘com.yourcompany.objective_resource’ contains illegal character ’: invalid bundle identifier 'com.yourcompany.objectiveresource’

I fixed this by following the instructions for 'com.yourcompany.App_Name’ contains illegal character ’_’. Basically go to Project -> Edit Active Target -> Properties and change identifier from …identifier} to …rfc1034identifier}

Hope this helps someone out!

! Fingerprint already exists. Please use one ssh key per Heroku account

Trying to change Heroku command-line users to add add-ons for the user in our organization that has the credit card information associated with him (Bill).

My account info: anthony@example.com His account: bill@example.com

Can run this to clear out my current Heroku username and password:

rm ~/.heroku/credentials

But unfortunately even after I authenticate with the new username and password, things don’t quite work right:

$ heroku list
Enter your Heroku credentials.
Email: bill@example.com
Password: 
Uploading ssh public key /Users/anthony/.ssh/id_rsa.pub
 !   Fingerprint already exists. Please use one ssh key per Heroku account

The problem is that the ssh key I’m trying to use is already associated with anthony@example.com’s account. So I need to generate a new one:

$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/anthony/.ssh/id_rsa): /Users/anthony/.ssh/bill_id_rsa
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /Users/anthony/.ssh/bill_id_rsa.
Your public key has been saved in /Users/anthony/.ssh/bill_id_rsa.pub.
The key fingerprint is:
[snip] anthony@Anthonys-MacBook-Pro.local
The key's randomart image is:
[snip]

Then I can run:

$ heroku keys:add /Users/anthony/.ssh/bill_id_rsa.pub
Enter your Heroku credentials.
Email: bill@example.com
Password: 
Uploading ssh public key /Users/anthony/.ssh/bill_id_rsa.pub

Getting autotest working with Rails 3

Here’s all the stuff I needed to get autotest (formerly known as autospec) working with Rails 3 and rspec 2. I’m assuming you are using bundler.

# Gemfile
source 'http://rubygems.org'

gem 'rails', '3.0.1'

group :development, :test do
  gem 'rspec'
  gem 'rspec-rails'

  group :autotest do 
    gem 'ZenTest'
    gem 'autotest'
    gem 'autotest-rails'
  end
end
# .rspec
--format nested
--color
# autotest/discover.rb
Autotest.add_discovery { "rails" }
Autotest.add_discovery { "rspec2" }

Then you can run:

$ autotest

at the command-line to run your specs automatically in a continuous testing fashion.

Could not find gem 'zentest (>= 0, runtime)' in any of the gem sources

Trying to install ZenTest gem, and came upon this error after adding:

group :development, :test do
  gem 'rspec'
  gem 'rspec-rails'
  gem 'cucumber'
  gem 'cucumber-rails'
  gem 'webrat'
  gem 'nokogiri'
  gem 'zentest' #######
end
$ bundle install
Fetching source index for http://rubygems.org/
Could not find gem 'zentest (>= 0, runtime)' in any of the gem sources.

The solution was to realize that ZenTest actually capitalizes the gem name. I think this is the only gem that does this that I know of.

group :development, :test do
  gem 'rspec'
  gem 'rspec-rails'
  gem 'cucumber'
  gem 'cucumber-rails'
  gem 'webrat'
  gem 'nokogiri'
  gem 'ZenTest' #######
end

pg_ext.bundle: [BUG] Segmentation fault

Trying to run the Rails 3 console using rvm and zsh and Mac OSX (Snow Leopard), and ran into the following problem:

$ rails console
~/.rvm/gems/ruby-1.9.2-p0@dealshare-backend/gems/pg-0.9.0/lib/pg_ext.bundle: [BUG] Segmentation fault
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]

zsh: abort      rails console

The 1.8.7 was confusing, since I was running 1.9.2 (as Rails 3 requires.) I merely removed 1.8.7, as I didn’t need it anymore. This seemed to fix the problem, although it hardly seems optimal

« View Newer Posts | Blog Archives | View Older Posts »