Monday, December 10, 2012

You have already activated torquebox...

Working with TorqueBox this afternoon I got the following error just after creating a new application :

You have already activated torquebox-core 2.1.2, but your Gemfile requires torquebox-core 2.0.3.redhat.1. Using bundle exec may solve this.

A quick check inside my .rvm/gems/jruby-1.6.7.2@appname/ folder showed that I had two versions of torquebox installed :



I deleted the incorrect version, 2.1.1.  Everything was fine.

Tuesday, August 14, 2012

Fedora fonts and infinality.net

I use Fedora, and I really like Gnome 3.  Gnome-shell is extremely productive.  However, Fedora is not known for the beauty of its' fonts.

A colleague suggested that I install the infinality fonts from infinality.net
 .

Run :
sudo yum install fontconfig-infinality
sudo yum install freetype-infinality

Fedora looks great.

Be  careful though : it deleted a lot of my preferences.

Tuesday, July 3, 2012

rvm requirements

I recently upgraded to Fedora 17, Beefy Miracle.  The first time I used rvm to install a gem I got the following :

ERROR:  Loading command: install (LoadError)
    no such file to load -- zlib
ERROR:  While executing gem ... (NameError)
    uninitialized constant Gem::Commands::InstallCommand

I ran :

rvm notes

and

rvm requirements

And installed everything listed as a requirement for Fedora 17. That still didn't do the trick. I reinstalled 1.9.2 with :

rvm install 1.9.2

And finally :

sudo yum install -y gcc ruby-devel libxml2 libxml2-devel libxslt libxslt-devel1.9.2

Finally!

The moral of the story is :
  • run rvm requirements 
  • check the error logs if there are any (the location is the last line of the output)

Wednesday, May 16, 2012

Fun with RVM

I typically work with jRuby.  I don't have "rvm use jruby" in my bash scripts,  but I might as well.

I wanted to install awestruct this morning.  I wanted to use C Ruby, or MRI.

The frst step for using awestruct is of course to install awestruct, gem install awestruct.

I got the following :

ERROR:  Loading command: install (LoadError)
    no such file to load -- zlib
ERROR:  While executing gem ... (NameError)
    uninitialized constant Gem::Commands::InstallCommand

  
I tried to install zlib with RVM :
rvm pkg install zlib

Unfortunately that didn't work:
/home/jeremy/.rvm/scripts/functions/pkg: line 52: cd: /home/jeremy/.rvm/src/zlib-1.2.6: No such file or directory
Configuring zlib in /home/jeremy/.rvm/src/zlib-1.2.6.
Error running ' ./configure --prefix="/home/jeremy/.rvm/usr"  ', please read /home/jeremy/.rvm/log/zlib/configure.log
Compiling zlib in /home/jeremy/.rvm/src/zlib-1.2.6.
Error running 'make ', please read /home/jeremy/.rvm/log/zlib/make.log

I tried the quick fix from the RVM site, https://rvm.io/packages/zlib/.
Reinstalled Ruby with :
rvm reinstall 1.9.2
rvm use 1.9.2
gem install awestruct

And back to work.

How to enable a datasource using the JBoss CLI

data-source enable --name=DATASOURCE-NAME

Thursday, March 8, 2012

How to shut down JBoss EAP6 / AS7 from the CLI

From the JBOSS_HOME/bin run the following :

./jboss-cli.sh --connect command=:shutdown

Thursday, March 1, 2012

Changing a symbolic link in Linux

Symbolic links are great.

I need to swap out local Maven repositories for the project I'm working on.  I created a symbolic link, "maven_repo" in my home directory that points the current local Maven repo.  When it came time to change the "maven_repo" link I realized that changing a symbolic link to a directory requires an extra command :

ln -sfn DESTINATION_DIRECTORY LINK_NAME

It wasn't so obvious from the man page.  This blog post saved me a ton of time.