Remember When?
I was looking through some old code from over two years ago, when I
was playing with my first Rails applications. I noticed this hidden file
in the public/
directory, called .htaccess
.
Do you remember the good âole days?
I was looking through some old code from over two years ago, when I
was playing with my first Rails applications. I noticed this hidden file
in the public/
directory, called .htaccess
.
Do you remember the good âole days?
Trying to finish my book and running PLANET ARGON consumes quite a bit of my time⌠so when the RailsConf people announced that they were accepting proposals for talks, I opted to pass so that it wouldnât distract from my sprint to finish my book. :-)
This decision was even easier for me when Nathaniel Talbot invited me to be part of his proposal for a panel of people that are running companies that specialize with Ruby on Rails. I liked the idea and the other people that were invited were all people that I greatly admired and respected⌠so I said yes. After all, so much of my time and energy goes into this stuff and there isnât any doubt that I spend way more time on the business side of Rails⌠than in code these days.
I just got an email from Nathaniel to let me know that his proposal was accepted.
So, if youâll be at RailsConf 2007 (US), come see me on The Business of Rails panel session.
The following people are planned to be on the panel.
Moderator: Nathaniel Talbott, Terralien Inc.
Panelists include:
I hope that you all send Nathaniel some great (and tough) questions⌠;-)
Iâve been using pound for several months and itâs been a good relationship. Except, for some strange reason, I noticed that I was getting development mode errors when it was running in production mode. I thought there might be an issue with my mongrel cluster⌠but that wasnât the case.
Let me give you a little background to how weâre encouraging customers to handle their deployment on PLANET ARGON.
Most of our hosting customers[^1^](#fn1){#fnref1 .footnote-ref role=âdoc-noterefâ} have three tiers (unless you have your own static IP address), one which we manage, two that you manage.
We handle the main web server/proxy server and proxy to your desired load balancer/proxy/server, which is generally any of the following options⌠depending on your preference.
Each customer has a unique proxy server port and a range of other ports for their mongrel clusters.
So⌠the typical setup isâŚ
Apache(external:80) [proxies to]> Pound(localhost:8050) [proxies to]> Mongrel::Cluster(localhost:10500-10503)
Well, when a request comes in through Apache, it gets passed off to
Pound and each tier has itâs own headers. By the time that it reaches
Mongrel, all the requests appear to be coming from localhost
.. not
the remote address of the person using your application. Notice nothing
but localhost
requests in your production.log? âŚthis is the reason.
So, what side-effects does this have? Well, aside from every request
looking local⌠Rails will, by default, output a normal
development-mode error message if the request is coming from
localhost
.
I was recently asked a few questions by Stacy Cowley, a writer for CRN about the Rails 1.2 release and how our Design and Development team at PLANET ARGON is adopting it. This Q&A session resulted in a brief article titled, Ruby on Rails Gets RESTFul in Major Update, which appeared on the CRN site last Friday afternoon.
Thanks to the Rails Core team and all of those in the community who continue to help make Ruby on Rails an awesome addition in my tool belt.
Yesterday, I announced the new Ruby on Rails Deployment group, which has attracted over 200 people and boasts over 50 messages in just the first 24 hours of itâs life.
While this is a greater turnout than I expected⌠I made a huge mistake yesterday. I forgot to invite the man behind the cutrain.
Our team is working on a new hosting solution[^1^](#fn1){#fnref1 .footnote-ref role=âdoc-noterefâ} for Rails applications. Throughout this process, weâve been reviewing all the various methods that our team and customers have been using to deploy and host applications written with Ruby on Rails. Our team has been able to closely watch the technologies change on our servers for almost two full years to accommodate the latest in deployment solutions.
Recently, a few deployment savvy customers of ours and us decided that it was time to take some of our experiences and conversations out into the public. Weâd like to invite all of you that are interested in Rails deployment to join the new Deploying Rails google group. Whether youâre trying to setup a staging server, deploy to a shared solution like we offer at PLANET ARGON, managing your own VPS, or configuring a cluster of servers for your big launch, weâd love to talk with you about this stuff.
Iâm secretly hoping that all the talented Rails deployment experts, like our friends at Rails Machine and Engine Yard, will join us in our effort. :-)
If youâre still hosting your Rails application on Apache and FCGI in a shared environment, this list is for you! ;-)
UPDATE Zed Shaw has entered the buildingâŚ
Stay tuned in early February... ;-)[âŠď¸](#fnref1){.footnote-back
role="doc-backlink"}
:::
Recently, I wrote about using RSpec and autotest (âŚwhich I think should be called autospec) together to help boost productivity while working on Rails projects. It seems that a few members of the PLANET ARGON team have picked up on using it, which Iâm happy to hear about. :-)
Itâs not the only thing that Iâm happy about though.
I recently came across another gem. Several of my comrades in
#caboose are using
piston to manage external
plugins for Ruby on Rails. Wait! Isnât
this what Subversion externals is meant
for? Well, yes⌠but externals also eat away at productivity. For
example, each day, we may have anywhere from 4-6 designers and
developers working on one client project. When weâre in crunch mode,
this could account for quite a few subversion commits throughout the
day. We all know that we should run svn up
on a regular basis to make
sure that weâre keeping things in sync⌠especially when designers and
developers are working really closely and fine tuning something specific
in the application. Well, the one downside to this process is that each
svn up
not only checks our repository, but it also checks external
repositories.
âBut wait! Canât you just ignore externals on an update?â
Of course, but who wants to type out âignore-externals
each time they
run an update? âŚor perhaps you could make an alias for this in your
shell. In any event, everyone on the team is then left to be responsible
for doing this⌠and an extra 30-60 seconds (if not longer) per svn
update times x number of people on project⌠well⌠time wasted if
youâre closely watching the svn updates. Also, TextMate doesnât have an
option currently (that I could find) to ignore externals, so for those
who manage subversion through it⌠theyâre waiting on externals within
their primary workspace.
Another issue with svn externals is that when a repository goes down, it
really starts to slow stuff down your updates. This is always fun when
you go to deploy your application with Capistrano and realize that you
canât finish the update because it canât connect it to
http://svn.lazyatom.com/public/plugins/acts_as_hasselhoff/
to make
sure that your application has the latest version of the best plugins
available for
Rails.
{width=â240â
height=â160â}
Then there is the whole issue of wanting to make changes to the plugin that youâre including as an external. How does that fit into the whole mix?
Piston encourages you to keep your external plugins in your local repository. Donât worry, it remembers where it retrieved the code from so that you can update from the external repository at any time.
Again, this is really simple like most gems.
Several months ago, I heard that people were using a program called
autotest to
have their tests continue to run as you made changes to your code base,
which comes with ZenTest. Itâs
a really nice tool written by Ryan Davis and I hadnât gotten a chance to
play with it as of yet. Well, our team isnât spending too much time in
the test/
directory these days as we jumped ship near the end of last
summer and found ourselves hanging out on the Isle of
BDD. The
locals are quite
thoughtful
about these sorts of things.
I just started working on a project that has been under development for several months and as Iâm getting to learn the ins/outs of the system, I find myself having to rerun the specs, which can take quite a bit of time watching. Watching your specs or tests run sometimes is as productive as watching your code compile. Oddly enough, this is as close to compilation as we really get when working with Ruby on Rails⌠and itâs a productivity killer for me.
So, I did a quick google search and found an announcement for Rails that ran specs through ZenTest. This was exactly what I was searching for!
Please makes sure that you have the following gems installed in your development environment as they are dependencies to make this all work.
<!-- -->
$ sudo gem install zentest diff-lcs
note Iâm going to assume that you have rspec and rspec for rails installed⌠if not⌠tsk. ;-)
```ruby
$ script/plugin install http://svn.caldersphere.net/svn/main/plugins/rspec_autotest
If you're using subversion, you might consider installing it as an
external.
```bash
```ruby
$ script/plugin install -x http://svn.caldersphere.net/svn/main/plugins/rspec_autotest
### Running RSpec autotest
This is where it gets tricky. ;-)
```bash
```ruby
$ rake spec:autotest
```
Now, you can keep a terminal window open and autotest will watch your application and detect when files change. When they change, itâll attempt to rerun your specs (specifically those that changed). This helps save you the time of having to rerun all your specs throughout the development process and keep your spec:all sanity checks for when youâre about to commit code to your repository.
Iâll post another entry in the next few days to show you how you can use Growl with RSpec Autotest to keep you from having to look at your terminal all the time.
Until then⌠have fun!
Hey! Youâre a cheater!
Well, if youâre not⌠Iâm hoping to make one out of you.
âA thing worth having is a thing worth cheating for.â â W. C. Fields
Iâm a fan of the PDF cheat sheets as I like the consolidated content contained in them. However, I donât like having to read PDFs any more than I have to. Printing them isnât always ideal either as I really donât like to carry around extra paper in my laptop bag. So, what are we to do?
Well, you can cheat the system! âŚand Iâm going to show you how!
Cheat is this really nice command-line tool that outputs a plain text cheat sheet whenever and wherever you want.
Like all the happy and good Rubygems, this is quite simpleâŚ
Well, they must be listening to me.
A few months ago, I posted that I was looking to switch mobile services. Well, I switched over to Cingular after a lot of back and forth and have been fairly happy with their service. I opted to get their lowend/entry phone as I wanted to get a nicer phone when I found something that met my requirements.
I wantedâŚ
Well, I hadnât found anything that really caught my attention. So, I heard rumors about Apple releasing a phone in January. So⌠I waited.
âYay Apple! I think Iâm in the right office, weâre all sitting here reading the keynote updates.â â Audrey
So, how much is this going to cost us? ..a few of us here came up with our predictions.
Thank you, Apple!
âŚwell⌠I would have given Apple a hug if I didnât have to wait til June.
âŚback to work.
Wow, this is pretty cool.
CDBaby is sponsoring conference passes AND twenty rooms at the Jupiter Hotel in Portland, OR during RailsConf 2007 to the top 20 contributors to the Ruby on Rails project from during January.
Start submitting patches!
During the summer of 2005, I wrote a post that listed several coffee shops in Portland, Oregon that I found to be really good places to work on your laptop at. Iâve gotten bored with my regulars and have recently begun to look for new places to venture to.
{width=â240â
height=â160â}
Pier Coffee is in a weird part of Portland that is somewhat isolated due to the train tracks that will block you in when a long train is moving through town. Itâs a very short walk from Allisonâs place and they have Oregon Chai, which has become my replacement for drinking coffee. The chairs in Pier Coffee are very comfortable and they have an electrical outlet at most of their tables. When you get bored, you can walk over and play darts, or get a glass of wine. The wireless works really well and when itâs not raining, you can sit out front and overlook the train tracks and downtown, while hacking on your laptop. Pier Coffee is what I would consider an easy place for me to feel productive. There usually isnât too many people here and I believe most of the customers are from the two condo complexes next to it. The staff is very friendly and their music tastes arenât annoying.
Backspace is about a half block from the PLANET ARGON office. They donât serve Oregon Chai, so I usually only get a tea, a viso, or a hot cocoa while there. They have a few tables and couches and I havenât found this a good place to be productive. Itâs a good place to have a short meeting with a coworker though. Music tastes are better here than most places, and they have a food menu now that caters to my vegetarian diet. There are a few electrical outlets, but the seats near them are often occupied.
Three Lions Bakery is about a block from the PLANET ARGON office. They do have Oregon Chai, so I stop by here often in the morning to get my fix. Not many electrical outlets, so your visits are usually not very long. They have a few sandwiches that are quite good. This is a good place to stop by if youâre in the mood to work for about a hour and have some chai and an excellent (and freshly baked) cookie.
If youâre in Portland and have some recommendations, please do share. Iâm looking for a few places that are open later in the evening.