Archive for the ‘ruby on rails’ Category
Testing sending a delayed_job email with Cucumber
I recently implemented delayed_job into one of our applications. It was done because the application was dropping emails at the expense of user experience. We had about 120+ “Net::SMTPServerBusy” notifications and something had to be done about that.
We had about six places in our application where the email-spec gem came into play with a nicely:
Then “thebaker@bakedweb.net” should receive 1 ?email
After implementing delayed_job they changed to:
Then “thebaker@bakedweb.net” should receive 1 delayed email
The question is: How would I go about implementing the step? I came up with the following:
Then /^"([^\"]*)” should receive 1 delayed email$/ do |arg1|
Delayed::Job.last.name[0..15].should == ‘Notifier.deliver’
end
I know my implementation is dirty and brakes if we are sending the email from somewhere else, but Notifier and it only takes into account 1 email. The real reason for this post is to pick you mind on how to better implement the step. How would you go about it?
Update: Kotrin from #cucumber came up with a neat regex for the step and tells us that we could probably expand on it to pick up on args.
Then /^"([^\"]*)” should receive 1 delayed email$/ do |arg1|
Delayed::Job.last.name.should match(/^Notifier\.deliver/)
end
Early feedback from users: an example
A successful web development project is the one that carefully listens to their visitors, customers and clients. There are projects where feedback starts even before any design or web development; moreover, it is not a coincidence that those are the projects that live longer or even become profitable. Even if you have not collected user data yet, you must set up a well design feedback loop if you are aiming for success.
I love how hashrocket asked, listened and crafted RMM (rails maturity model). Obie introduced it in the Rails Business list with this message (Feb, 12). Surely after, there was a rave about certifications vs whatever. All this controversy generated tons of blog posts like this, this, this and a huge twitter stream.

The feedback gathered around the information stream was priceless. It is truly an example of how we can validate our market and get feedback from users even before investing in development. It took Obie just one email. Today, they launched the app unofficially and all the drama around the certification argument was put to rest by their tagline “Rails Maturity Model It?s not about certification. It?s about success”. Be sure to notice that their tagline was gathered from early feedback.
To immature people I left the discussion on how much of a good thing is the RMM for the rails community. However, we can learn how to ask for early feedback from this example. We see a lot of value on professional development and give two thumbs up for this project. We are proud to be part of the RMM and we are honored to be among giant firms. Surely, we’ll learn many more things from all of them.

Yonopelo design + conceptual process.

Don’t know how many of you out there know about our new application we are developing called Yonopelo.
Yonopelo is an innovative job board, which ultimate goal is to get you a job in what you enjoy doing and what you are best at doing. How is that possible? We believe by personal experience that if you do what you are passionate for, the you will be great at it! Why? Because you are happy
Concept? What does Yonopelo mean? In our language and culture when someone is ‘pelando’ menas they do not have money at the moment…so basically the saying means I’m not not going to have money = I will have money!
Ok, our vision was to put a name behing this system…a character per say. His name is Sr. Yonopelo Ramirez. Ramirez is a very common last name, which refers to he could be anyone…you? me? him? her? anyone you know.
We decided to go with a very clean and fresh branding and teaser site. Our goal in the branding process was to get people identified, fresh and innovative people to be interested in the product by supporting the branding/concept.
Our goal with the teaser site = to build momentum. We want to encourage people to register and we will be releasing news on this project soon.
The whole project will be up and running very soon…
With this being said, keep in touch with Sr.Yonopelo Ramirez.
Deploying ruby on rails app in Media Temple
We are about to deploid our newest project Yonopelo to Media Temple Grid Containers and we are going to share the experience with you. We wanted to make this process as smooth as posible so we decided to go with git, github and capistrano.
We are using Jobberrails as the codebase for Yonopelo, so we fork it from github.
git clone git://github.com/jcnetdev/jobberrails.git
After that we just created a new project on github to store Yonopelo’s code.
git config --global user.email ivan@bakedweb.net
git init
git add .
git commit -m "first commit"
We had to delete the origin and add ours.
git remote rm origin
git remote add origin git@github.com:bakedweb/yonopelo.git
git push origin master
Let’s move on to Capify our project. We need to install the gem:
gem install -y capistrano
This is where you have to decide a lot of stuff about you application. Just go to capistrano’s website for a better overview of this process.
capify .
Make sure you run the above code in your application’s root directory. It will create two file, but we are using config/deploy.rb to tell capistrano what’s up.
The recipe for deploying Capistrano to Media Temple can be found here. and I found the original media temple capistrano recipe here. You need to change the fallowing parameters for it to work:
set :site, ""
set :application, ""
set :webpath, ""
set :domain, ""
set :user, ""
set :password, ""
set :scm_password, ""
Notice how we tell capistrano to create the database.yml from the /config/database.yml.mt. You’ll need to create that file. We then go to
cap deploy:setup
cap deploy:check
cap deploy:update
The last comand gave me an error so I had to ssh into the grid and install the aplication manually fallowing Media Temple’s guide to ruby on rails
mtr add yonopelo $PWD yonopelo.com
I then created the databases and migrated the schema.
rake gems:install db:create db:schema:load db:migrate
Guala!
Some interesting article:
Getting Started with ruby on rails on Media Temple
Ruby on Rails application on Primary Domain (Media Temple)
Anouncing Roomero - time-share selling software

We are hype to tell the world that we are working on an exiting new project. Roomero is a web-based software that organizes the process of the timeshare selling experience. We are focusing on simplicity and usability while providing a fresh approach to an industry that’s long over due for a new paradigm.
It is still in the early stages of development and it is not open to the public, but we are looking for a few early adopters to help us craft the inner workings of Roomero. If you run a timeshare selling operation, please go to the registration page and sign in. We are looking forward to hear from you.
We’ve been working with ruby on rails for almost a year on internal applications, but this is our first? outer world app. Yupy! This makes this project exponentially more exiting.
