RSS

Tag Archives: rvm

The hardest aspect of software development!

The hardest aspect of software development is keeping your systems configured properly. Installing tools like rvm, govm, virtualenv and so on is pretty simple but once you’ve installed the base packages there are any number of dependencies that you have to deal with and getting a consistant install is no less difficult or tedious than TDD (test driven development).

I had a strategy once that included using a VMWare instance that I would use to build a base-line configuration for the target project. Then share that baseline with others on the team. This strategy came to me after years of dependency documents, repository sub-projects, storing dependencies in the project tree, and even dedicated target build/test machines which is the closest to the VM strategy.

I think it would be ideal if there were a script or program (and it might already exist) that would reverse engineer your current dependency list; installed gems or pips etc… and generate an install script that would would work cooperatively with your rvm or virtualenv so that you or a team member could re-build the dev/staging/production environment from scratch as easily as possible.

 

 
Leave a comment

Posted by on 2012/07/07 in architecture

 

Tags: , ,

I want to play with sinatrarb but I cannot bring myself to install RVM

I’ve been given a small project to quote. At first I thought that the team was already using rails but after a code inspection of the proof of concept (POC) I realized it was PHP. Well, I’m not a PHP person but I can do it if I have to and that’s when I started to think that maybe I could implement this in Rails. But Rails was overkill so why not sinatra? It’s actually a half decent platform so why not.

I’ll tell you why not.  Because for this one simple, teeny, tiny project I would have to start installing all sorts of cruft and that made me very unhappy. As I have mentioned previously RVM is a mess and it puts all sorts of demands on your system. Sure the ruby gurus have plenty of time and patience for this sort of thing. But for certain, I do not.

*sigh* but I might do it anyway.

 
2 Comments

Posted by on 2012/07/03 in architecture

 

Tags:

Another killer app for Perl

I’ve written about perldoc and CPAN as being Perl’s killer apps. I’ve also written about Ruby’s RVM and Python’s Virtualenv. Now I get to write about Perl’s perlbrew.

I’ve been tweeting(@rbucker) with a couple of techies today s a result of a comment that one of the made. Something to the effect that virtualenv was going to be made a core python app. Suggesting that it was going to be rolled into the distro.

If you’ve been around a while and you have a little intuition… it should be going off at this very moment. I’m not going to go into the high level discussion that I had with these guys nor am I going to go into the micro details. What I will say, in summary, is that this is a very bad idea and as a result virtualenv should become very unstable as a result.

Which got me thinking about Ruby and Perl. On the one hand I know that Ruby has RVM but is there something for Perl? Yep! As I write this article I have installed perlbrew and I’m installing Perl 5.16.0 at this very moment.

I do not know anything about perlbrew at this point other than it seems to be installing Perl properly and in userspace where I want it. If all goes well and I have the required prerequisites all should be well in the next little while. I really like Perl and Python. The idea of dumping Python feel like jumping the shark. Perl-6 and Python-3 feel unnatural at the moment. I’m just hopeful that virtualenv and perlbrew can keep my world glued together until the rest shakes out.

 
 

Tags: , , , , ,

RVM excels over virtualenv… (update) NOT!

[Update 2012-04-21:] What a freakin’ mistake. Rails is such crapware that it defies explanation or description. I had just completed installation of rails on 2 different Macs and an Ubuntu server. I then created my “demo” project to make sure that everything was installed properly. And I discovered that I had not. This was was a pretty good patch and it went flawlessly. When I went back to my project and tried the “bundle install” each of the projects barfed. When I finally got the ubuntu installation to fein completion I ran “rake about” and I now get javascript errors. I get it, I’m missing more prerequisites. This reminds me that I had a complaint about rub, rails and gems. The dependency stack is just too freakin’ deep. There is no way that anyone knows everything from shell to DB. Think about the autoconf tools. It is so long in the tooth these days that it is more magic than  reality. The difference is that the executables there are clear, maintainable and reproducible. Ruby and Rails are no more eliteware than erlang. Show me someone who claims to be a Ruby expert and I’ll show you someone who build vaporware on pretendware. (I’m pissed for spending 100′s of dollars on books and RubyMine; and weeks letting my mind consider that there was some value in Ruby; for taking a Ruby Job in Alabama… which I was converting to anything else… and for scanning the ruby job boards over the last few months) Virtualenv might not support many different versions of python, however, python just freakin’ works and the same can be said for Django.

[Update 2012-04-20:] With RVM you can install just about any version/revision of Ruby that suites you. I am in the process of installed 1.9.3-p194 right now and RVM supports a number of different flavors like MacRuby, ree. Virtualenv, on the other hand, is at the mercy of userspace installation of the target python and even then versions like pypy require patches not yet pulled back into virtualenv. I cannot say that this is the only reason for moving to Ruby from python but it is pretty strong.

… when dealing with the issue of the language versions. RVM gives you direct access to the versions of ruby currently available and installed and virtualenv puts the burden on the user. And installation is a pain in the ass,

 
Leave a comment

Posted by on 2012/04/21 in updates

 

Tags: , , ,

GO’s missing feature fulfilled

I really like the GO language, however, I’ve had a couple of complaints that prevent me from using it in production. (a) the language has been a moving target and it seems that the 3rd party library developers have lost whatever momentum they had. (b) the absence of a version manager like RVM for Ruby or VirtualEnv for Python.

Well we cannot do anything about (a) because it’s as much political and emotional as it is technical and cost. But having (b) in our back pocket makes development so much easier(GVM – go version manager). I think once it makes it into the mainstream of GO development more real progress is going to be made.

Go offers a nice balance between perl, python, ruby, java, erlang, lisp and a few others. With it’s memory management, sockets, IPC, datatypes, compiled, formated, syntax… it’s just a nice balance.

 
Leave a comment

Posted by on 2012/03/25 in ProgLang, Tools

 

Tags: , , ,

My Ruby Installation

[update 2012-01-22] A new project is underway. ‘crud-fest-rb’ it’s part of a new story I’m writing. I just tried to launch a new rails project and I was blocked because I was missing some basic gems. They are now in the list below. The names are: jquery-rails, coffee-rails, sass-rails, uglifier. My empty RubyMine/rails-3.2 project is now running. The CRUD comes next.

[update 2012-01-21] I just published this article a few hours ago and I realized that I forgot some stuff. I forgot to mention that I need Twitter’s Bootstrap project here too. So when I start working on my first project I’ll need to import Bootstrap. I might have missed a few more things… I have been following python and many of the python libs longer than ruby so that makes sense. If you have any recommendations send them on. PS: TextMate is getting an update soon but I think I’m going to install and use RubyMine from jetbrains.com. It’s like PyCharm, also from jetbrains.com but for Ruby and supports Rails. (hopefully Rails 3.2). Like PyCharm, RubyMine support RVM out of the box. Nothing special required.

I’m not a great fan of Ruby. I was in the beginning when I was first introduced to Spring. And it was not so much Ruby as it was Rails. The fact that it did all the CRUD one could want was a big deal. Now it’s not that uncommon. Django offers CRUD for python app developers and Grails offers CRUD for java developers.

Reddit recently linked to a visual comparing python, ruby and php. There were some interesting observations about the number of programmers and projects in each vertical. That combined with my new love for RVM has given Ruby a new lease on life in my toolkit. (I have also worked on professional Ruby projects but without RVM they were no fun).

RVM is a big deal. Not unlike virtualenv for python, RVM allows the programmer to install and configure his/her development environment in userspace. This means that many of the fears I had about creating my dev environment on my local hardware and version collision and dependency mismatch means that all I really need to do is create a separate user directory on my laptop for each project. This way everything is nicely partitioned and what I can focus on is backups rather than the crazy live of remote virtual servers for development. Of which there is still some value for demonstrations and client access.

So let’s setup a basic RVM install so that we can start our next project. Some of the installation is going to overlap with the python installation (here). You can skip all of the userspace installation but the sudo installation is all you’ll need. Keep in mind that this installation was all about a virtual server at RackSpace. If you are installing on a Mac or Windows machine your install will be different.

Install the default ruby. I originally thought that I’d need to install at least one Ruby installation in the core OS but it turned out to be unnecessary. RVM will install any version of ruby for you. Once RVM is installed you can issue the command (rvm list known) and you’ll get a list of the known rubies available. In fact I had to remove this package and start again because of some side effects down the road.

apt-get install ruby1.9.1

Install RVM

bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)

startup RVM… you can logoff and back in or you can look at the last line of your ‘.profile’ and execute the source command.

source "/home/rbucker/.rvm/scripts/rvm"

NOTE: I did some looking at the .rvm directory and I saw some things that did not make sense.  It seems that many of the modules and ruby artifacts were being installed in a ruby folder labeled 1.9.1 presumably that was a ruby version. I have restarted the install process several times now and it appears that RVM is installing my version of ruby 1.9.3-p0 as a set of patches over version 1.9.1 which explains the folder structure.

install a recent Ruby version

rvm install 1.9.3-p0

Make this version current (you will have to run this command every time you login)

rvm use 1.9.3-p0

If you want to make this version of ruby the default version run this command (note the default command will insure this version of ruby os ready each time you login)

rvm use 1.9.3-p0 --default

which rubies are installed and which is current

ruby list

install some gems in userspace. Note that rvm is taking over the gem install. Lucky for me Rails 3.2 was released a few days ago and now it’s installing. I’ve elected to install Sinatra too. That’s because it’s a useful micro framework when rails is just too much.

gem install rails
gem install jquery-rails
gem install coffee-rails
gem install sass-rails
gwm install uglifier
gem install sinatra
gem install redis
gem install mongodb
gem install pg
gem install mustache
gem install fastercsv 
gem install iso8583
gem install sqlite3
gem install ruote 
gem install json
gem install sxp
gem install sexp
gem install zmq
gem install beanstalk-client
gem install rmre
gem install haml
gem install db-charmer
gem install mail
gem install activemerchant
...
gem update money rack rake sourcify sprockets

**there were some initial difficulties installing the ‘pg’ gem. It started off as a problem because the install would not complete. I kinda realized that I was missing the postgres dev files so I installed that core package as the root user. When I installed the gem on my OSX machine it installed nicely. I’m not certain I know why or how the postgres client was installed on my OSX machine but it seems to have included enough code to compile the gem. MacPort was not installed on either machine or maybe it was corrupted because it’s not functioning and I’d swear that it was installed once before.

**one other thing that is concerning me is the version number of the ZMQ gem. If the version number maps to the version of the main lib then they are mountains apart and that’s something I cannot afford. It’s one of the reasons that I’m going down the path of RVM and native gem management. Some interesting notes; the version of the GEM is 2.0.7 and when you run ZMQ.version() from the IRB you get different results so it must be checking the binary libs.

On my OSX

rbucker@rmac[usr]$ irb
1.9.3-p0 :001 > require 'zmq'
 => true
1.9.3-p0 :002 > ZMQ.version()
 => [2, 1, 10]

On my Ubuntu

rbucker@soldev:~$ irb
1.9.3-p0 :001 > require 'zmq'
 => true
1.9.3-p0 :002 > ZMQ.version()
 => [2, 1, 11]

install gems for building gems. I do not know anything about them except that I hope that they work.  I’ve installed all three because they should not collide. There is a 4th and 5th option.  There are some devs that have github general templates that they use. You can always roll your own in a similar way. Personally I’m interested in these 3 projects because it might mean less editing for me.

gem install jeweler
gem install hoe
gem install echoe

At this point I’d create my bare bones project, install bootstrap just like the python version, and then start hacking my project.

Reference material: I really like pragprog.com. They seem to have the most current docs. Their PDF and epub ebooks are great and they keep me updated. (Rails 3.2 was just released and their eBook was also updated just a few days later; granted not much was supposed to have changed, but still).

In the coming week I’ll be writing an article on the CRUD-fest in django and rails as I start building my credit card association test harness. Stay tuned as this page will be updated as I add gems to my basic installation.

 
Leave a comment

Posted by on 2012/01/21 in Tools, web

 

Tags: , , , , ,

 
One Page Docs

Creating a library one page at a time.

One Page Bugs

Reducing the friction of writing and fixing bugs or features.

Follow

Get every new post delivered to your Inbox.

Join 223 other followers