Nach langer Zeit der Abstinenz schreibe ich mal wieder einen kleinen kurzen Blogeintrag. Der Anlass ist die Umstellung einiger Server und derer Dienste, wodurch auch dieser Blog wieder eine andere Plattform erhält und zurückkehrt zu WordPress.
Since rvm 1.19.0 there is a alternative way to specify a project related ruby version and gemset through the files
.ruby-gemset instead of the still valid use of the
.rvmrc file. The
.rvmrc is of course as before the default configuration for rvm, but it requires to be trusted, as it could contain any shell command. Further the recently supported files are compatible with other ruby version managers like rbenv or chruby.
So after an upgrade of rvm a message like below would be displayed if you enter a directory which contains a
You are using ‚.rvmrc‘, it requires trusting, it is slower and it is not compatible with other ruby managers,
you can switch to ‚.ruby-version‘ using ‚rvm rvmrc to [.]ruby-version‘
or ignore this warnings with ‚rvm rvmrc warning ignore /Users/dboeckma/workspace/mymine/bookmarks/.rvmrc‘,
‚.rvmrc‘ will continue to be the default project file in RVM 1 and RVM 2,
to ignore the warning for all files run ‚rvm rvmrc warning ignore all.rvmrcs‘.
Like the messages says you could switch to the new configuration with the given command.
rvm rvmrc to .ruby-version
This results in the following two files. First the
.ruby-version in which the ruby version is defined.
.ruby-gemset with the gemset that should be used in conjunction with the ruby version.
Surely, the ruby version and gemset can differ in your files. 😀
So far so good. The problem comes with the next try to use pow with the new configuration files. The recommended
.powrc, which comes with pow, only considers the
.rvmrc file, which not exists any longer. As a result pow uses the wrong default system ruby version and gemset. With a slightly enhanced
.powrc file, like the one below, it will run with both variations.
if [ -f "$rvm_path/scripts/rvm" ]; then source "$rvm_path/scripts/rvm" if [ -f ".ruby-version" ]; then if [ -f ".ruby-gemset" ]; then rvm use `cat .ruby-version`@`cat .ruby-gemset` else rvm use `cat .ruby-version` fi elif [ -f ".rvmrc" ]; then source ".rvmrc" fi fi
Programming Ruby – The Pragmatic Programmer’s Guide is a free book about Ruby linked on the Ruby documentation page. Quite old but for most properties of the language suitable. Of course, there are some more useful links on the Ruby documentation page like the Ruby Core Reference or the Ruby Standard Library Reference, which lead to the Ruby documentation project.
O’Reilly has two free german books available on the internet. The first is O’Reilly Praxiswissen Ruby about the language Ruby and the second is O’Reilly Praxiswissen Ruby On Rails about Ruby on Rails. The last is mainly about Ruby on Rails 2 and for starters highly likely not interesting since Ruby on Rails 3 was released.
Ruby on Rails Tutorial is a great book about Ruby on Rails 3, which is free available on the internet. It is also purchasable as printed version or as pdf version on the site. In the book you will create a twitter simliar page by a test driven approach and with source code management by git. A short introduction to Ruby is certainly present in the book. On the side of Ruby on Rails can be found also some useful stuff. Two of them are the Ruby on Rails documentation and the Ruby on Rails tutorials.
Lastly some more links:
Well, now I’am using git about 2 years as my favourite Source Code Management (SCM). In this time I have collected some links that may help beginners to get into the world of git and Distributed Version Control System (DVCS).
As apparent from the title the links will mainly cover topics referring to git, but I will not let mercurial unmentioned. Mercurial is also a DVCS which features are comparable to git. It’s no loss to take a closer look at it, too.
Of course, there is the homepage of git with plenty of useful stuff – including git itself, but I think a good starting point to get familiar with the workflow off a DVCS and certainly especially git
is GIT±IMMERSION. It shows in a nice step by step tutorial the common usage of git. As reference for the several git commands it is worthwhile to look at GIT Reference. Another useful page which arranges tips by topics is git ready. Last but not least there is a wonderful free book call Pro Git available online. Additional the german podcast named Chaos Radio Express has a episode „Verteilte Versionskontrollsysteme“ about DVCS and the in parts funny tech talk from Linus Torvalds.
Some more advanced is the a-successful-git-branching-model by Vincent Driessen. This model describes a way to manage releases of a software with a branching strategy. The project gitflow on github extends git with some scripts, which simplifies to follow the model. By the way github, bitbucket and gitorious are some of the hosters for git repositories and useful for collaborate working, if you not want to set up your own server. I think you will see sooner or later that DVCS offer more workflows to work together as via a centralized server. Hope this short overview will help some one to get faster into the git world.
For a better overview all links in one list:
- Homepage of git – Home of git
- GIT±IMMERSION – Step by step tutorial
- GIT Reference – Reference by commands
- git ready – Reference by topics
- Pro Git – Great free book
- tech talk – Talk from Linus Torvalds about git
- a-successful-git-branching-model – A model to manage software releases
- gitflow – Scripts to easily follow the branching model
The console of Mac OS X, is just like any unix console. It’s very powerful and can simply be customized over the preferences of the terminal application and by setting environment variables like *PS1*. So here is a picture of my current terminal.
As mentioned before, it is a combination of preferences and some variables. So here is my current setup a bit more detailed.
First of all the preferences of the terminal app. Here I changed mainly the text font and color. I think the ordinary settings are self explaining. You can start by duplicating an existing configuration over an option under the gear symbol and customize it. Mine is based on the *Pro*.
If you like it, you can download the configuration of MyOrangeTerminal.
To activate the new configuration for every new window, go to the *Startup* tab and select it under *On startup, open*.
The second is the environment variable *PS1* which should be specified in the file *~/.profile*, which will be automatically executed on each start. This definition includes a nice behaviour in interaction with git. As you may have seen in the first picture it shows the current branch of the git repository, if you in one. Crucial is that you have git installed and included the git *bash completion* which comes along with the git installer for Mac OS X.
More information about the meaning of the components in the *PS1* definition can be found in the article prompt magic. It mainly describes the colours and available variables that can be used in the *PS1* environment variable.
So here is my blog inspired by Gentle Bytes and their blog post „Moving from Word Press to static content„. In which they describe there way from WordPress to PieCrust. PieCrust is a PHP based static website generator to „bake“ websites. They also mentioned a post titled „Blogging With Octopress“ written by Matt Gemmell. Ultimately convinced by Matt Gemmell and Octopress I setup this blog.
I like the clear look, the simplicity and file based attempt very much. Also the fact that the whole content can be administrated, managed and provided with some nice techniques like Markdown, git and SSH. Just check out the well done documentation of octopress for the possibilities.Startup