Total 58 Posts

AWS: Working with CodeCommit

Elastic Beanstalk is a one-stop shop for Ruby on Rails developers to publish their apps. In this tutorial, I'll show you how to first commit your app to AWS CodeCommit so that you can then publish over to EB. There are a lot of steps so here's a high-level overview:

Ruby: Pathmap

The Ruby library Rake has an awesome tool called Filelist that is great for manipulating files. For example, suppose you had an array of files with different path names, using the pathmap method, you can do some elegant file path parsing without the need for regular expressions. require 'rake' list

Rails: List Objects Using Rails Console

I was looking for a way to get a collection of every model using the Rails console. Here are a few simple ways to do it. Step 0 If you do not have Ruby on Rails installed, please read this tutorial Step 1 Run Rails Console. rails c Step 2

Using Jenkins to Trigger Rake Tasks

This tutorial will show you how to install Jenkins on Linux Debian using VirtualBox and Vagrant. After you've installed Jenkins server, make sure you have both ruby and rake installed by typing: Step 0 - Install Ruby and Rake which ruby which rake Step 1 - Install Rake plugin Once

Rails: Running a scheduler

Heroku offer's a pretty nifty scheduler add-on for running jobs on your app at scheduled time intervals, much like cron in a traditional server environment. If you ever need to create something similar in a non-Heroku environment, here's how using whenever. Step 1 First create a simple Ruby on Rails

Rails: Order by DESC

I wanted to present three different ways to get data from a Model and arrange it in descending order. Below are a few examples of how to get data from a Keyword model. Method #1 - Using a Controller Path: app/controllers/keywords_controller.rb At the controller level, you

Ruby: Converting XML to JSON

Today I was asked to convert an XML file full of e-mail addresses into JSON. The first file is titled email_builder.rb. The second script is titled email_parser.rb. Source Code

Rails: Database Relationships

When dealing with relational databases –such as Postgresql, MySQL or AWS RDS– it helps to understand how tables interact with one another. This cheatsheet is is designed to remind me how to connect the dots between different tables using Rails command-line generators. For the past few years, I've been working

Heroku: Managing Multiple Accounts

I feel like this is the first thing Heroku should tell you about after installing Toolbelt. For the longest time, I thought the only way to switch between different accounts was by logging out and logging back in. Here's how you can work with multiple Heroku accounts without having to
You've successfully subscribed to Chris Mendez
Great! Next, complete checkout for full access to Chris Mendez
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.