-
Another year gone by...
Wow, it is so hard to believe that I have been living the life of a freelance Rails developer for the entire year of 2012. What a year it has been.
I have learned so much this year and expect to learn more next year. I know that it is early for new years resolutions but I plan on being more active in the Ruby community next year. I will finally get off my ass and start creating screencasts and doing local presentations for what I call "Rails, now what?"
I know that all of us in the Ruby community owe so much to others that have come before us. Many are those that are unnamed and others we all know of. No matter how much or how little, we are all part of the community and are all responsible for growing this community.
Let's all try to teach other more next year. Let's all try to stay away from the Rails community drama that makes all look like arrogant assholes. Let's all remember what it was like when we were just starting out and how much we appreciated help from others. Next year let's all of us take the time to teach one other person about Ruby. There are people that are interested in becoming interns. Find them, teach them and set them free. The best RoR programmer you will ever hire is one that you yourself have trained. Let's all of us commit to giving at least one presentation this upcoming year.
Remember people, that we are what we are because somebody helped us out once upon a time.
Here is to a great 2013 and lets all make Ruby on Rails the best that we can!! …
-
Testing with Rails Select2
Lately we have been incorporating select2-rails into our applications. I cannot say enough how much I love this tool and its ease of use. That being said, we had had issues with testing and select2-rails. So Steve Tong of Rebel-Outpost spent some time and found a small script to use for testing it. https://gist.github.com/4339329 The only issue with this is that you can only have one option in the select2. If anybody finds a better way, please let us know. …
-
Ubuntu 12.04, Ruby, Rails, Nginx, Unicorn and git-deploy
I recently put together a sort of setup script for setting up a Rails production server: https://gist.github.com/4330509 …
-
Ubuntu 12.10 Server Setup for Ruby on Rails, Passenger, Nginx
So we all know what a pain in the ass it is to setup a new server for Ruby on Rails. This is why I love to use Heroku for hosting. There are times that this is not an option so we have to use a hosted linux server. For this walk thru I used Rackspace with Ubuntu 12.04 for hosting. This is about as fully detailed as possible.
Server Setup
- Create new server on Rackspace
- Login to new server
- ssh root@IPaddress (you can also use the domain name if you have the DNS setup already)
- accept the RSA key
- use the password provided at server setup
- change the password that was provided at setup:
- $ passwd
- Create a new user for deployment
- $ sudo adduser "username"
- accept the defaults
- add new user to staff and sudo groups:
- $ usermod -a -G staff "username”
- $ usermod -a -G sudo "username”
- switch user
- $ su "username"
- $ sudo adduser "username"
- Update and Install dependencies:
- To make our live easier, lets go ahead and add our ssh keys to the new server so we do not have to sign in every time (this is done from your machine and not on the server):
$ cat ~/.ssh/id_rsa.pub | ssh root@IPaddress "cat >> ~/.ssh/authorized_keys"
Install Ruby
Install your Ruby (obviously you use the version that you want. At this point many people use a Ruby version management like RVM or RBENV. As these servers are normally setup for just on application we will use the system version of Ruby): https://gist.github.com/4220698Passenger and Nginx
First let's install Passenger and Nqinx: https://gist.github.com/4220722 Setup script to control Nginx: https://gist.github.com/4220728 You should be able to control Nginx. To start and stop server: https://gist.github.com/4220752- Go to your IPaddress (or domain name) and you should see "Welcome to nginx"
- After installing nginx, you should see the following message in the terminal:
- Setup the nginx.conf for our server
- edit the /opt/nginx/conf/nginx.conf
- add the IPaddress to the server name (You may use the domain name if you have one)
- add the path to your apps public directory to the root
- add the user to the nginx.conf
- user “username” staff;
- if necessary, set the rails environment using rails.env
Database Setup
At this point there are a lot of different ways to go. The database needs to be setup. There are multiple options for databases such as MySQL, PostgreSQL, and Mongodb.MySQL
https://gist.github.com/4220778Deploying Rails
There are also several options for deploying your Rails application. The option that I am going to use is a nice little gem called git-deploy. After following the directions for git-deploy:- ssh into the server
- cd into you application
- check your Rails environment$ echo $RAILS_ENV
- if it needs to be set:
- add "export RAILS_ENV=staging" to the the ~/.bashrc
- $ source ~/.bashrc
- if it needs to be set:
- run bundle
- rake db:create
- rake db:schema:load (if needed)
- rake db:migrate
- touch tmp/restart.txt
-
What's new
Wow, I have really been too busy to find time to post anything lately. Lots going on the last couple of weeks.
We just started a new project that it totally cutting edge and I am so excited to be a part of it. Intern #2 Steve Tong, is now fulltime on the new project as a Junior Developer. Truth be said, Steve Tong was not mush of an intern as he was already passed that point skill wise. Something that Steve T. displayed that impressed me is his ability to think outside the box. I know that is a horrible cliche but it is what distinguishes a developer from a programmer. The new gig is mostly a concept so we are able to design / create it as we feel fit, and that is what requires a developer that has ideas and can envision something great. For now the who what and where obviously will remain a secret but I guarantee that I will be blogging about it as soon as it goes live.
So what makes a great intern? Simply put, motivation. It does not matter how much or how little you know or even at times, how fast you can learn it. What does matter is the effort and the motivation to make it as a developer. I recently met a junior developer that is mostly doing front end stuff and has expressed the desire to become a Rails developer. What impressed me already is that he learned Git over the weekend. He was using some crazy GUI for accessing Github and I gave him a hard time about it. So I guess he showed me!!
Some cool things that I have learned about recently......
Select2 for rails asset pipeline
Select2 is a jQuery based replacement for select boxes. It supports searching, remote data sets, and infinite scrolling of results. Theselect2-rails
gem integrates theSelect2
jQuery plugin with the Rails asset pipeline. Awesome and so easy to use for kick ass drop downs. A must have in your rails toolshed!RABL for Rails
RABL (Ruby API Builder Language) is a ruby templating system for rendering resources in different format (JSON, XML, BSON, ...). You can find documentation here. rabl-rails is faster and uses less memory than the standard rabl gem while letting you access the same features. There are some slight changes to do on your templates to get this gem to work but it should't take you more than 5 minutes. rabl-rails only targets Rails 3+ application and is compatible with mri 1.9.3, jRuby and rubinius. If you use a lot of json, this is the gem for you!!!Easy git deployment
Straightforward, Heroku-style, push-based deployment. Your deploys will look like this:
To get started, install the "git-deploy" gem.$ git push production master
$ gem install git-deploy
Screw using all the hard stuff. With this I can now deploy to staging or production just as easily as pushing to me fork.
Rails ERD
Rails ERD is a plugin for Ruby on Rails that generates diagrams based on your Active Record models. Such an entity-relationship diagram gives an overview of your models and how they are associated. Browse through example diagrams, or read the installation instructions.
-
Giving back to the community
I pondered the title of this post for a few minutes today. I almost went with "What have you done for me lately?" but decided not to.
The point of this post is giving back to the community that has given us so much. In my early days learning Ruby on Rails I got so much free help from so many people and resources. I now earn my living using open sourced software that does not cost me a penny. There are a zillion free sites for learning RoR as well as paid sites. The point is, we all should return the favor and give back to the community.
One of the biggest Rails companies out there is Thoughtbot. We all use free open sourced tools that they created like Factory Girl, Paperclip, Capybara Webclip, etc.. They could very easily charge for these tools and we would all happily pay for them. How do they do it? Taken from the Thoughtbot website:
We invest Fridays in ourselves Our fundamental expectation for ourselves is delivering excellent work for clients Monday-Thursday. We use Fridays for personal development, contributing to open source projects, mentoring apprentices, sharing lessons learned on the blog, and making internal tools to make our jobs easier and more fun
Now tell me that these guys do not kick ass!!! Now they are not the only ones that are giving back. Go count all of the Ruby gems out there!!!
So what is Rebel Outpost doing to give back to the community? We have the RailsCRM which is getting close to alpha. It can be used already if you want a no fluff, just the right stuff Customer Relations Management (CRM) system. Check it out and if you would like to make changes, go ahead and fork it, change it, and submit a pull request. If you have ideas or suggestions, please email me.
Last week I release Rebel Outpost Foundation which is a foundation starter app. We are constantly making new rails applications so this foundation is to be used as our starting point. This is also designed to be bare bones with not styling but comes loaded with all of our favorites like Mongodb, Mongoid, Devise, SASS, HAML, Pry and more. There is (hopefully) a pretty good explanation in the readme file for setting it up and deploying it on Heroku. If you try it out and find any issues, again, please let me know.
So, what else? Well, I am really trying to balance everything so that I can start putting out my "Rails, now what?" screencasts and I think that I would like to create an easy to use RoR Content Management System (CMS) in the not so distant future.
So remember the community that gives you so much and show a little gratitude by giving back to it. …
-
Startup Weekend Phoenix Impression
This weekend I attended my first ever Startup Weekend. I am not sure what I expected it to be like but it was not what I expected at all.
The weekend started off Friday night with 51 ideas being pitched for Startups. It was amazing to hear so many different ideas for starting new companies. After all of the pitches, all attendees we asked to vote for 3 ideas that they liked. After this voting, ideas were selected based on the number of votes and we were left with I believe about a dozen selected ideas. Then the frenzy began...
Teams started to form around each of the selected ideas. There was a definite shortage of developers and designers so I was approached by several teams to join. I went with "Get that kid a job" which was pitched as a service to help students to identify career paths, prep them for interviews, assist with resumes', and how to keep a job. Over the weekend we were "assisted" by mentors that had us pulled in several directions. In the end we "simplified" our application down to providing week long internships for students at businesses that they were interested in.
We did not win.
What did I learn from the weekend? Well, it was more of the process of identifying a real problem and providing a successful solution. There was more business planning and ideas than there was developing anything. It was great. Even that I own my own business, I have never participated in the whole business planning. We had a small team of four and we all spent the weekend discussing what we wanted our new company to do and how to do it. Even though we did not win, the four of us committed to continue working on the project.
I have never had any desire to work for a startup and I have actually heard bad things about developers working for startups. This weekend changed all of that. Granted there are a plethora of ways to get funding, I think I have gotten bit by the startup bug.
When building web applications for others, there is not any residual income involved. When building open sourced software, there is no residual income or any income for that matter. Time is money and my time is very valuable to me. There were a couple of ideas that I really thought would be good money making ventures and I am talking with some about working on a sweat equity based project. What do I have to lose? Some of my spare time which as I said is very valuable to me. What do I have to gain? Partnering with smart people with great ideas and a revenue stream in the process.
If you have never been to a startup weekend, you must go. From working on something new to making new friends to networking, it was a great weekend. …
-
Hey Companies looking for direct hires......
It amazes me how often I am contacted by recruiters looking for direct hire developers in cities that I would never move to. I have blogged about remote workers before but I still do not see companies moving to hire them. So, from the Harvard Business Review: Why Remote Workers Are More (Yes, More) Engaged If you cannot find direct hires in your city, well then look for remote workers. It really is that simple!! …
-
Rails, stuck on the tracks
I have put much thought into this post, now that is not to say that the other posts were created without any thought.
I am what I consider to be as a self taught programmer. A couple of years ago I decided to learn Python as I was working with ArcGIS on a regular basis and I wanted to automate some of the functions that I did on a regular basis. That summer I studied and taught myself Python at least the part for creating geoprocessing scripts. Before this I had no desire to learning programming let alone programming itself. Soon I had found that it was fun to program. I then created user interfaces to pass data between our application that ran on ESRi’s ArcGIS and our clients and third party softwares. I was hooked.
The company that I worked for then began to create a web based routing application that was written using Ruby on Rails. I started to dabble with this application as I already had a pretty good grip on HTML and CSS. It was fun designing and developing this application and helping create it from the ground up. I started to learn Ruby on Rails.
Not to insult those that created the initial application or those that have made it what it is but as I now know that the application is horrible. As I was trying to learn RoR, I would ask the developer questions about Ruby. I will never forget the comment that this well known Rails developer told me; “I really do not know Ruby that well.”
So going forward, I assumed that learning Ruby was not that important to be a Rails developer. On the outside looking in or scraping the surface it truly is mostly HTML or as I have learned to love, HAML. I didn’t spend much time learning Ruby as the ‘expert’ Rails developer said he didn’t know Ruby that well so why should I?
So off to the tutorial I went. I was and am amazed at the amount of learning tools and tutorials that are out there for learning RoR be it free or paid stuff. I originally looked at Django as I was coming from Python but I did not find as much material for learning Django as I did for RoR.
Blogs, To do’s, pretend stores.....
I spent quite a while going thru many of the available Rails tutorials that are available out there from Michael Hartl’s tutorial to creating pretend stores to Rick Rolling it, I went thru the tutorials. Over and over like a sponge I went thru these tutorials. Rails for Zombies, and Peepcode and anything that I could get my hands on, I did tutorials.
But then, I found myself stuck on the Rails tracks not sure where I was going or how to get there. I knew how to follow the step by step instructions but how was I to advance? I tried to think of an application that I could create and tried to create that application. I had no clue what the Hell I was doing and got really frustrated.
It hit me; Rails, now what? What do I do now? What is the next step to becoming that super ninja Rails developer? Now what?
We have all been there. It seems that most of the RoR people I know are ‘self taught’ with some having formal education for programming. How do I make it from making applications using tutorials to becoming that full fledged Rails developer?
That is in my opinion the missing link. As I have brought aboard my 3rd Rails intern I have seen that they are most of the time in the same situation as I once was, asking themselves ‘now what’?
Well, I am happy to announce that Rebel Outpost is going to be adding a ‘learning section’ to our website and we are going to be adding videos for a “Rails, now what?” screencast series.
I will be adding a list of topics soon as well as our first screencast “BDD and the User Story” to include the presentation slides. These videos will hopefully help others in the ‘missing link’ stage of their Rails training.
I will be blogging about the videos as we release them and if there are any topics that those of you feel should be included, by all means, email me your suggestions.
…
-
Rebel Outpost adds new Partner
Today, we added Steve Young (@jediunixmaster) as a partner to the Rebel Outpost, LLC. Steve has been working his tail off since joining us in the beginning of the year. Always eager to please and a workaholic by nature, Steve never slows down and he does not quit until the job is done.
His many years of programming experience combined with his business management skills will definitely be a valuable asset to Rebel Outpost.
It has been an exciting week this week with a new partner and a new intern!!! Go Rebel Outpost!! …