Joey Dev Dot Info

A web development blog focusing on Rails and Javascript.

Rails AWS Configuration

Trying to figure out how to use the carrierwave gem with rails (on Heroku) to upload files to AWS turned out to be a difficult task. Most of the problems I ran into had nothing to do with code but how permissions were set up on my Amazon S3 bucket. My carrierwave.rb initializer looked like this:


Sinatra Heroku Deployment Issues

I created a simple website using the Ruby based Sinatra framework for my electronic music project. I developed it around the same time I was learning the framework at Flatiron School. To get started I copy pasted a project that was working and used it as a template for my site. Everything was fine when I first deployed it to Heroku. At that time I embedded an iframe to display my upcoming concerts. I always hated not being able to control the CSS of the iframe in an easy manner. I created a hack to try an interject some css in the songkick.com widget:


React Frontend Rails Backend Architecture

For my final project for Flatiron School I created a website with a Rails Backend and a React Frontend. I decided to make a site that queries Songkick.com and Bandsintown.com. Some bands I know use different services so instead of visiting two different sites I wanted have the results in a centralized location. Eventually I want to add Facebook events in another column. I guess you could say my idea is like the Kayak.com version of finding concerts.


Javascript Context

The first thing to understand about ‘context’ in javascript is that it is not ‘scope.’ Scope refers to variables and how and when they are declared and defined. Context refers to the keyword ‘this’ and what it returns depending on where you see it inside your code.


Rails API w/ Javascript

Using the Active Model Serializers gem and jquery’s ajax methods I was able to add some extra functionality to my Rails app. The site lets users upload electronic music instruments (a ‘patch’) and I wanted to add comments to the patches show page without refreshing the page . Along with adding comments I wanted to add some pagination to the patches index page so users can scroll through recent uploads.