I had to write a pretty complex rake task this evening. I made some seriously big changes to my client app and need to run some processes to update some big changes in the database.
The first question I had was where to add a method that the rake task could call. While this seemed a pretty easy thing to do, a google search led me no where so I went with trial and error. In the end I found that the method needed to go AFTER the task do block and not in it.
desc 'this is the description of the task'
task do_something: :environment do
my_objects.all.each do |object|
The next thing I want to do was to use an existing helper that was in my Rails project. This was easily found with Google.
You simply need to require the helper file and include it. I added this between the dec and the task do block:
Hope this helps :)
I just made my first year where I work and it has been crazy fun and challenging.
When I started a year ago, our application was in the hands of near shore developers. They had just taken over from off shore developers a couple months prior to my coming on board. They were by far still in the learning curve. The first deployment we did after I got there was a team effort and a load of finger crossing.
The near shore team did an excellent job learning the application and where churning out user stories like mad. As they were all located in Mexico there was no time difference to speak of and with the help of Skype and daily standups, we were able to work efficiently.
Shortly after I started working here, I started to build my in house team. Finding good available Rails developers in the Phoenix area is quite impossible.
My first hire was somebody that was previously one of my interns for my company. I had to pay pretty good to convince him to come on board. He was quite happy with his current employer.
From there the search was difficult. We ended up bringing on a couple of interns from ASU and I just had the pleasure recently to hire one of them on full time. Another developer that was in the learning phase keep hounding me and we brought him on as a junior Rails developer where he has continued to excel. Another developer expressed interest in working with us. We brought him on as an intern and was recently made a full time employee as well.
Other additions to the team were a top notch Project Manager and a Senior SysAdmin to handle the multiple servers.
Last month the contract for the near shore developers was up.
We are all in house now and working on site. The old saying cant teach a dog new tricks really means something sometimes with senior developers. They sometimes get stuck in their ways. New junior developers looking to make a living programming are generally eager to learn and so far I have had success with 5 out of 7 interns.
They cant get hired without experience and can’t get experience if they don’t get hired.
Try hiring a developer intern. Check out the local universities that have CS programs. If you can’t find great developers; build them.