Just finished Chapter 3 of the Ruby on Rails Tutorial (Rails 5) by Michael Hartl, and after the umpteenth time going through "rails new app" and "rails scaffold this-that-or-the-other", I got on to static pages. It's a bit to take in, but it's starting to make sense.
Showing posts with label codecare. Show all posts
Showing posts with label codecare. Show all posts
Wednesday, April 5, 2017
Tuesday, April 4, 2017
Rails Web Console
I am running Rails from within an Ubuntu Vagrant box:
Vagrantfile specifies ports to open during "vagrant up".
The HTTP address (localhost) is accessible.
However, I ran into this problem.
This solution worked for me.
Thursday, March 30, 2017
Rails Day 5: VirtualBox It Is, Then
After a lot of fiddling with Docker, I have decided to stick with a simple development environment in a customised Ubuntu box in Vagrant. I will get back to Docker, but for now I'll stick to what I know and get on with the business of learning Rails properly.
I find sometimes when I'm learning something new and difficult that I have to bash away at it, fail, and then come back a week later. The concepts haven't quite come together in my head and my work blocks get chewed up without my having much to show for it.
In the meantime, I have a functional Rails development environment with Postgresql running in Vagrant/VirtualBox:
I find sometimes when I'm learning something new and difficult that I have to bash away at it, fail, and then come back a week later. The concepts haven't quite come together in my head and my work blocks get chewed up without my having much to show for it.
In the meantime, I have a functional Rails development environment with Postgresql running in Vagrant/VirtualBox:
Wednesday, March 29, 2017
Rails Study, Day 4: Docker and Vagrant
I came for Rails, I'm working on DevOps.
The purpose of this post is to give an account of setting up my development environment in order to study Ruby on Rails.
I am already familiar with Vagrant, and initially thought I would spin an Ubuntu 16.04 box and work in that. However, the obvious and numerous disadvantages of working in a virtual machine on a local hard drive demanded that I find something better.
So I decided to finally invest some time on Docker, and I have to say, once I wrapped my head around the concept of containers, getting started seems fairly straightforward.
Initial Steps:
- Install Vagrant on my host
- Install Docker on my host
- Spin up an Ubuntu box in Vagrant
- Install Docker on my VM
- Create an account on Docker Hub
- Download the Heroku Cedar 16 image
- Create a private docker repository on my host
- Run the Heroku Docker image
- Push a modified Docker image to my own repository
- Pull the modified Docker image to my VM
And so forth.
As I want my development environment to mirror Heroku's settings as closely as possible, I decided to see what the Heroku website itself has to say on the matter.
My inclination was to keep it simple by using Vagrant, but Heroku's Cedar stack is available as a Docker image, so I will go with Docker instead. I've been meaning to familiarise myself with Docker for a while, so this works for me.
Official Notes for Docker are available from Gist.
This videos helps to demystify Docker.
I'm now looking into simplifying it further and using a Droplet from Digital Ocean.
Monday, March 27, 2017
Rails Study, Day 2: Rails Install Fest
I have started a demonstration blog on Rails according to the instructions on the Ruby on Rails Install Fest, my first proper attempt at building something substantial on Rails. My goal is to build a website that showcases my solutions to Advent of Code, but the first step is to have a site running on Rails, and in my case, hosted on Heroku.
Wish me luck!
Update:
Update:
Had to solve problems with installing the following gems:
Wish me luck!
Update:
Update:
Had to solve problems with installing the following gems:
- json
- pg
The json gem was set to 1.8.3, but I solved it by forcing the version to 1.8.5.
The pg gem was able to install after I properly re-installed Postgres on my machine.
Update:
Now running into problems with Postgresql.
Update:
Now running into problems with Postgresql.
Friday, March 24, 2017
Thursday, March 23, 2017
Ruby Achievement Unlocked, Time for Rails
Having reviewed my solutions to the first three Days of puzzles of Advent of Code, I am now comfortably proficient in the fundamentals of programming in pure Ruby.
When presented with a problem, I am confident that I can do the following:
Thereafter, I am now confident that, given enough time, I can solve the problem. There is room for vast improvement, but that will come with time.
I really enjoy the daily solution of programming puzzles, and would love to solve all fifty; however, my duty is to prioritise my studies according to optimal employment criteria, and there aren't a lot of jobs going for junior developers who specialise in solving fun puzzles in pure Ruby.
Having passed this milestone in my learning, I am now ready to hit the books again. My study plan encompasses the following:
To gain experience in upgrading older Rails versions, I could probably clone the source code of an existing Rails to a virtual machine, on which an old version of Rails is installed. However, this is a lower priority.
As all who know me can attest to, I can learn and work quickly and efficiently, and am adaptable and resilient. I also take pride in managing expectations between multiple clients and communicating with both clients and colleagues.
For the next couple of weeks I will focus primarily on the Rails framework by working through Ryan Bigg's promisingly large tome: Rails 4 in Action. In this way I expect to establish a thorough grounding in Rails and also a gain a perspective on the changes from Rails 4 to Rails 5, which could come in handy if I ever work on a legacy codebase.
When presented with a problem, I am confident that I can do the following:
- Define the problem
- Describe the solution broadly in programming terms
- Denote the likely classes and methods to be used therein
Thereafter, I am now confident that, given enough time, I can solve the problem. There is room for vast improvement, but that will come with time.
I really enjoy the daily solution of programming puzzles, and would love to solve all fifty; however, my duty is to prioritise my studies according to optimal employment criteria, and there aren't a lot of jobs going for junior developers who specialise in solving fun puzzles in pure Ruby.
Having passed this milestone in my learning, I am now ready to hit the books again. My study plan encompasses the following:
- Build a website in Ruby on Rails to showcase my Advent of Code puzzle solutions. This includes the following:
- Deep knowledge of Rails
- Proficiency in Javascript
- Proficiency in JQuery
- Proficiency in HTML/CSS
- Proficiency in PostgreSQL and/or mySQL
- Writing automated tests in RSpec (my preference) or Factory Girl
- Host the website on Heroku
- Additionally, I will further my knowledge of the following:
- Coffeescript
- Haml
- Amazon Web Services: it would be good to know which services are of the highest priority, as one could spend a lifetime on there.
To gain experience in upgrading older Rails versions, I could probably clone the source code of an existing Rails to a virtual machine, on which an old version of Rails is installed. However, this is a lower priority.
As all who know me can attest to, I can learn and work quickly and efficiently, and am adaptable and resilient. I also take pride in managing expectations between multiple clients and communicating with both clients and colleagues.
For the next couple of weeks I will focus primarily on the Rails framework by working through Ryan Bigg's promisingly large tome: Rails 4 in Action. In this way I expect to establish a thorough grounding in Rails and also a gain a perspective on the changes from Rails 4 to Rails 5, which could come in handy if I ever work on a legacy codebase.
Subscribe to:
Posts (Atom)
1,050 hours
It took me 13 working days to complete my first 100 "work" pomodoros as a Junior Software Tester at Profectus Group. Much of ...
-
I have finished re-writing my text adventure game, Tree House Prince, available here: ( https://github.com/clockworkpc/tree-house-prince...
-
NOTE: My fiancée wishes to stay out of the online limelight, and neither her real name nor her image shall appear in this or future posts. ...
-
It's 03:08 and I am finally starting to make sense of object-oriented programming. It's not that I didn't understand it concep...







