Blog

Showing posts with label osx. Show all posts
Showing posts with label osx. Show all posts

Monday, January 24, 2011

Upgrading Git via MacPorts (1.6.6 to 1.7.3.5)

I upgrade Git this morning to the latest version available via MacPorts. I ran into a few issues, but mostly painless. Here is the run down:

sudo port selfupdate
sudo port upgrade git-core

First upgrade attempt resulted in the following error:

--->  Dependencies to be installed: readline
Portfile changed since last build; discarding previous state.
--->  Activating readline @6.1.002_0
Error: Target org.macports.activate returned: Image error: /opt/local/lib/libreadline.5.2.dylib already exists and does not belong to a registered port.  Unable to activate port readline. Use 'port -f activate readline' to force the activation.
Error: Failed to install readline
Log for readline is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_readline/main.log
Error: The following dependencies were not installed: readline
Error: Problem while installing sqlite3

Executing the following command resolved this issue:

sudo port -f activate readline

Try upgrading again:

sudo port upgrade git-core

Resulted in the following error:

Configuring db46¬ 23 Error: db46 requires the Java for Mac OS X development headers.¬ 24 Error: Download the Java Developer Package from: ¬ 25 Error: Target org.macports.configure returned: missing Java headers¬ 26 Log for db46 is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_db46/m    ain.log¬
 27 Error: Problem while installing db46¬
 28 To report a bug, see 

I downloaded and installed the Java Developer Package.

Another attempt:

sudo port upgrade git-core

Success!

git --version
git version 1.7.3.5

Thursday, September 23, 2010

Use Terminitor to get your Rails Development work flow setup quickly

For the average Rails Development project I have the following terminal windows setup:

  • Spork for RSpec
  • Spork for Cucumber
  • Rails Server
  • AutoSpec
  • RStakeout task for automatically running Cuke Features

Automatic Workflow Setup

That's a lot of terminals to setup and task to execute! In comes Terminitor to automatically open those windows and run the required tasks. I have the following file in ~/.terminitor/rails-dev.yml:

# Rails Server, Rspec, Cucumber with Spork Setup
---
- tab0:
- tab1:
  - rvm use ruby-1.8.7-p302@default
  - spork rspec
- tab2:
  - rvm use ruby-1.8.7-p302@default
  - spork cuc
- tab3: 
  - rvm use ruby-1.8.7-p302@default
  - script/server
- tab4:
  - rvm use ruby-1.8.7-p302@default
  - autospec -f
- tab5:
  - rvm use ruby-1.8.7-p302@default
  - autocuke

All I need to do is change into the directory of the project and execute:

  terminitor start rails-dev

I keep a blank tab, tab0 so I have a terminal window to play with, otherwise the first "tab" uses that window.

Issues

There was a only a couple of issues I came across which were pretty straightforward to work around. First, it didn't respect my default setup for rvm. I added what Ruby and Gemset to use.

The other issue was that it appeared to screw with by $PATH a bit. It added a space to the last path entry which I think was causing havoc. I just added $HOME to my path, I don't care if it messes with that.

Conclusion

I was definitely getting a little tired opening all the terminal windows for each project. This is well worth checking out.

Please note this blog is no longer maintained. Please visit CivilCode Inc - Custom Software Development.