We’re currently waiting to get our new podcast approved by Apple, but have uploaded episode 1 to tumblr in the meantime.
Chris Wanstrath (@defunkt) just posted the following on twitter.
“Hello Rip – http://hellorip.com/“
The Rip project describes itself as, “an attempt to create a next generation packaging system for Ruby.”
One of the cool features is that it supports multiple environments. For example, you can have different Rip environments (with different gem versioning) that are targeted towards specific applications. I have to dig around more through the project, but this looks fascinating.
Check it out at http://hellorip.com/
I’m also curious as to how you think you might be able to start using this.
- What are some ways that you could use Rip—http://heybrainstormr.com/t/pgte
1 comment Latest by Alex Stoneham Tue, 02 Feb 2010 18:20:27 GMT
Our development team likes to extract reusable pieces of code for our projects and have historically used plugins. However, we are finding more and more people releasing these sorts of modules/components/patterns as gems.
Which do you prefer and why?
If you use both, how do you decide to use plugins or gems?
We’re starting a new project and I’m finding myself adding things to the code base that we’ve done in the past… hence the last few posts. As we’re doing this, I’d like to highlight some of the little things that we do on each project to maintain some consistency and in that process reach out to the community for alternative approaches.
I’m intrigued by the vendor everything concept, but we haven’t yet adopted this on any of our projects (yet).
What we have been doing is to maintain a
REQUIRED_GEMS file in the root directory of our Rails application.
$ cat REQUIRED_GEMS actionmailer actionpack actionwebservice activerecord activesupport cgi_multipart_eof_fix daemons fastercsv fastthread feedtools gem_plugin image_science mongrel mongrel_cluster mysql rails rake RedCloth Ruby-MemCache soap4r uuidtools
Everybody on the team (designers/developers) knows to look here to make sure they have everything installed when beginning to work on the application.
This has worked fairly well from project to project but since we’re starting a new project, I’m curious if anybody has some better ways to approach this. Should we look more seriously at the vendor everything approach or are there any alternative approaches?
“a tool like grep, aimed at programmers with large trees of heterogeneous source code.”
It’s written in Perl, which is fine and dandy… but before I installed it, I heard that there was a Ruby version named rak, which describes itself as…
“a grep replacement in pure Ruby. It accepts Ruby syntax regular expressions and automatically recurses directories, skipping .svn/, .cvs/, pkg/ and more things you don’t care about. “
Sounds great. Let’s see what this thing can do.
Daniel Lucraft, the author of rak, was kind enough to package it up as a Rubygem. So, all we have to do is install it via
gem install rak.
> sudo gem install rak Password: Bulk updating Gem source index for: http://gems.rubyforge.org Successfully installed rak-0.8.0 Installing ri documentation for rak-0.8.0... Installing RDoc documentation for rak-0.8.0... ~ >
Great, let’s move on.
Now that it’s installed, we can use Rak by typing
rak from the command line. You’d typically want to run this from within the root of your application.
For example, basic usage would look like the following.
$ rak search-pattern
In my first test, I ran
Immediately, I see a greater advantage to
rak over using
grep and that’s because it’s giving me line numbers for free, which takes remembering a few extra options with grep.
grep, we can specify a specific path to search with. For example, we use a view helper named
link_to_unimplemented to help us track actions that aren’t implemented yet. Looking at a current project, I can run
rak link_to_unimplemented app/views and produce the following results.
I’m going to keep playing with it, but wanted to help get the word out. If you have any tips on using it, please share them in the comments. :-)
If you previously followed my article, Installing Ruby on Rails and PostgreSQL on OS X, second edition and are now upgrading to OS X Leopard, you’ll want to make a few adjustments to your setup.
First of all, it’s great that Apple has decided to provide Ruby on Rails out of the box.
How many gems does it come with?
~ > gem list rails *** LOCAL GEMS *** rails (1.2.3) Web-application framework with template engine, control-flow layer, and ORM.
~ > gem list|grep '^[a-z]'|wc -l 29
It’s really great that Apple shipped Leopard pre-installed with 29 gems, especially if you don’t have your entire Rails stack setup already. In my case and for those that have followed my installation process, you don’t need to switch over to this new development stack (yet). I have a lot of time invested in my fully-functionaly MacPorts installation process (PostgreSQL, MySQL, RMagick, Subversion, Git, etc. Since this all working fine on my machine, I’m not ready to make the switch to Apple’s installation.
Don’t Fix it… if it’s not broken!
So, the the first thing that I did was modify my
PATH environment variable, which has
/usr/bin as the first path that it’ll look at when you try to run commands like
gem, etc. You’ll want to modify this and prepend
/opt/local/bin: to the front of
PATH in your shell configuration. If you’re using bash, this would be…
~/.bashrc. If you’re using zshell like me,
Now, when you start a new Terminal and run
gem list, you’ll see all of the gems that you already have installed.
~ > gem list rails < new-host *** LOCAL GEMS *** rails (1.2.5, 1.2.4, 1.2.3, 1.1.6) Web-application framework with template engine, control-flow layer, and ORM.
Back to my happy gems…
~ > gem list|grep '^[a-z]'|wc -l < new-host 72
Great! Now I can get back to work and spend time playing with the new features in Finder, Mail.app, and iChat instead of installing all of the software dependencies that our development projects have. :-)
Older posts: 1 2