Witty.ca - Mr. Rich's Professional Archives

  • Home
    • Lunch
    • Support
    • Intro
    • Cyber
  • Courses
    • Course Listing & Updates
    • DMS 2022-2023 >
      • Tech and Design Grade 6
      • Tech and Design Grade 7
      • Tech and Design Grade 8
    • -----------------------
    • DMS Archive 2021-2022 >
      • Tech and Design Grade 6 2021-22
      • Tech and Design Grade 7 2021-22
      • Tech and Design Grade 8 2021-22
    • HCS Archive 2015-2016 >
      • HCS'15 Media Studies 120
      • HCS'15 Nutrition for Healthy Living 120
      • HCS'15 Visual Art 9
      • HCS'16 Intro to Electronics 110 >
        • Purchasing a Computer in 2016 >
          • HCS'15 Visual Art 110/120
      • HCS'16 Housing & Design 120
      • HCS'16 Visual Arts 10
      • HCS Winter Decoration Ideas
    • HCS Archive 2014-2015 >
      • HCS'15 - Digital Production 12
      • HCS'15 - Graphic Art & Design 11
      • HCS'15 - Media Studies 12
      • HCS'15 - Visual Art 10
      • HCS'14 - BBT 10
      • HCS'14 - Info Tech 11/12
      • HCS'14 - Visual Art 9
      • HCS'14 - Visual Art 11/12
      • HCS Art Club
      • HCS Announcement Text
    • HCS Archive 2013-2014 >
      • HCS'14 - English 12
      • HCS'14 - Graphic Design 11
      • HCS'14 - Individual & Family Dynamics 12
      • HCS'14 - Info Tech 12
      • HCS'14 - Social Studies 8
    • Student Introduction Form
  • Tech Units
    • Safety & Citizenship >
      • Work Place Safety
      • Digital Safety & Citizenship
      • Digital Communication
      • Digital Rights & Responsibilities
      • Digital Etiquette
      • Digital Wellness
      • Digital Business
      • Digital Access
      • Digital Literacy
      • Digital Law
    • Scratch Coding >
      • Scratch Explained
      • Scratch 3 - Crossy Road 1
      • Scratch 3 - Crossy Road 2
      • Scratch 3 - Teacher Notes
      • OLD - Scratch 2 (Coding) >
        • Scratch 2 - Introduction to Coding
        • Scratch 2 - How to
        • Scratch 2 - Introduction
        • Scratch 2 - Frogger (p1)
        • Scratch 2 - Frogger (p2)
        • Scratch 2 - Frogger (p3)
        • Scratch 2 - Frogger (p4)
        • Scratch 2 - Frogger (p5)
        • Scratch 2 (Coding) >
          • Scratch 2 - A 2nd Project
          • Scratch 2 - Teacher Notes
          • Scratch 2 - Choosing another language
      • OLD - Scratch 1 (Coding) >
        • Scratch 1 (Coding)
        • Scratch (Scripts 1 & 2)
        • Scratch (Script 3)
        • Scratch (Frogger)
        • Scratch (Frogger 2)
        • Scratch (Frogger 3)
        • Scratch (Frogger 4)
        • Scratch Mini-Challenge 1
        • Scratch Final Project
        • Notes for Teachers >
          • Teaching Scratch
    • Graphic Design with Inkscape >
      • Graphic Design Overview
      • Inkscape Act.1
      • Inkscape Act.2
      • Inkscape Act.3
      • Inkscape Act.4
      • Inkscape Act.5
      • Inkscape Act.6
      • Inkscape Bonus Challenge
    • Photoshop with The GIMP >
      • GIMP Overview
      • GIMP Install & Setup
      • GIMP Activity 0
      • GIMP Activity 1
      • GIMP Activity 3
      • GIMP Activity 4a
      • GIMP Activity 4b
      • GIMP Activity 6b
      • GIMP Activity 6e/f
      • GIMP Final Project - Cereal-Box
      • GIMP Final Project - Magazine Cover >
        • HCS'16 Graphic Art & Design 110
      • GIMP Bonus Assignment
      • GIMP Marking Breakdown
      • Raster Graphics Explained
      • Old GIMP Activities >
        • GIMP Activity 2
        • GIMP Activity 6a
        • GIMP Activity 6c
        • GIMP Activity 6d
    • Excel
    • Audio / Video >
      • Sound (Audacity)
      • Video (One Minute PSA)
      • Make a Movie Trailer
      • Blender Video Editor - Test
    • Automotive >
      • Auto - Careers
      • Auto - Engines
      • Auto - 4-Stroke vs 2-Stroke
    • Coding - Teacher Start
    • Python (Coding) >
      • Python - CS 110 PD - July 2016
      • Python - CS 110 PD Part 2 (Projects)
      • Python - CS 110 PD Part 3 (GUI)
      • Install Python 3.5 + PyGame
    • Design (AutoCAD) >
      • Design Act. 1
      • Design Act. 2
      • Design Act. 3
      • Design Act. 4
      • Design Act. 5
      • Design Act. 5b and 5c
      • Design Act. 6
      • Design Act. 7
      • Design Act. 8
      • Design Act. 9
      • Design Act. 10
      • Design Act. 11
      • Design Act. 12
    • Design (Sketchup) >
      • Sketchup House Setup
    • Portable Apps >
      • Cam Studio
      • Virtual Dub
      • Scratch (and Zip File for Students)
      • TuxPaint (and Zip File for Students)
      • TuxTyping (and Zip File for Students)
      • Google Chrome
    • Project Management >
      • Intro to Project Mgmt.
      • Assignment for Project Management
    • Database >
      • Tasks Database
    • Final Projects and Exam Review >
      • Final Project - BBT 10 - 2015
      • Final Project - Digital Production 2015
      • Final Project - Media Studies 2015
      • Exam Review 2013
    • Cybersecurity
  • Art Units
    • Elements and Principles >
      • Elements of Art
      • Principles of Design
    • Photographic Composition
    • Visual Art 9
    • Graphic Art & Design 110 >
      • Colour Theory
      • Layout
      • Fonts and Type
    • Visual Art 110
    • Previous Box Projects - Visual Art 10
  • Other Units
    • Housing >
      • How to Design a House
    • Media Studies >
      • Media Studies Handouts
      • What is media? Why study media?
      • Film, Television and Video
      • Advertising, Marketing and You
      • Media and the Internet
      • Self-Study Project
    • Nutrition >
      • Recipes >
        • Black Bean Cake and Cupcake
  • Sports
    • Volleyball >
      • NMS Volleyball 2019
      • Volleyball Contact
      • (Old) Volleyball 2017
      • (Old) Volleyball Spring 2016
      • (Old) 2016 Tournament - MS Boys Volleyball
      • (Old) Volleyball Spring 2015
      • (Old) 2015 Tournament - MS Boys Volleyball
    • Soccer >
      • (Old) Soccer Fall 2015
    • Basketball
  • Blogs
    • Computer Science Blog
    • Personal Blog
  • Contact
  • About
    • About Mr. Rich
    • About Technology and Computer Science
  • Archives
    • Teaching Software >
      • Purchasing a Computer (notes) >
        • Purchasing a Computer
        • Computer Scenarios
        • Computer Presentation
        • PAC Test Instructions
        • PAC Peer Review
        • How to Submit Computer Comparisons
        • How to Submit Computer for Helen
      • Scratch 2 (Coding)
      • Scratch 1.4 (Programming)
      • ARCHIVED - GIMP (Raster Graphics)
      • ARCHIVED - Inkscape (Vector Graphics)
      • AutoCAD (2D Design)
      • Sketchup (3D Design) >
        • Google Sketchup (2011)
        • Google Sketchup (2012)
      • Excel vs Calc (Spreadsheet)
      • Cam Studio (Screen Capture Videos)
      • TuxPaint (for young kids)
      • TuxTyping (Typing Tutor)
    • Links >
      • Career Links in Fredericton
      • Job Hunting Tips
    • Presentations >
      • Scratch Workshop Oct 11, 2013
      • Scratch Workshop Sept 18, 2013
      • Math for French Immersion
    • Software That Is No More >
      • Setup (for an older version of Weebly) >
        • Setup - Day 1
        • How To Setup Your Weebly Pages
        • Marks (link to Canvas)
        • Web Portfolio
    • Previous Teaching >
      • Old Teacher's Logs >
        • Teacher's Log 2015-2016
        • Teacher's Log 2014-2015
        • Teaching Notes - Hartland 2014
        • BBT9 Teacher's Log (Apr-June2013)
        • BBT9 Teacher's Log (Jan - Apr 2013)
        • BBT9 2012
      • Sept2010-Jan2012 >
        • Old Home
        • Middle School >
          • Literacy
          • Social Studies 6
          • Social Studies 7 >
            • Online Test - Canada at Confederation
      • Jan2012-Nov2012 >
        • Book Blog >
          • Blog to Book
        • About Mr Rich
    • PD Sessions >
      • BBT9-10 Oct6 2016
      • BBT Teachers PD (Jan 2013)
      • Cyber-bullying (May 2013)

A fresh Rails install...

20/6/2012

1 Comment

 
Picture
Well, it's been so long since I was working in Rails, that I've decided to start over again with a new-to-Rails system.  I'm re-commissioning an old laptop running WinXP, so I used the Ubuntu WUBI installer (google it) and then I chose to load Lubuntu into a 20GB partition.  [Yes, I defragged first, using Defraggler.]   (If you're not a super geek and you want a lightweight Linux variant that is specifically built for older computers, I recommend Lubuntu.)
...

What next (all based on Rails Tutorial settings):
  1. Install Ruby 1.9.3 (to match the Rails Tutorial settings)
    To do this, I used the Ubuntu Software Center to install the Synaptic Package Manager. (Yes, this is redundant, as both do similar things.  However, I'm more familiar with Synaptic.) Then, choose "libruby 1.9.3", accept the required packages and click "Apply".  (Downloads ~30MB and installs for you.)
    Alternately, I could have gone to the command line and done the same thing with:
         sudo apt-get install ruby1.9.3

  2. Install Git.  The tutorial directs you here, which was helpful.  However, "git-core" is now considered 'obsolete' (in Synaptic).  So, at the command line, I did:
         sudo apt-get install git

  3. Install Curl.  The tutorial then directed me to a RVM installer PDF. However, inside, it suggested to install both git-core and curl.  I looked up "curl" and it helps transfer data between servers, so I did that quickly (as it was small).
         sudo apt-get install curl

  4. The RVM installer said the following, so I did this: 
         bash < <(curl -s https://rvm.beginrescueend.com/install/rvm) 
    FAIL Alert!  Sadly, this failed.  However, I followed the link contained in the code above and realized that everything had been moved and simplified here:
         https://rvm.io/rvm/install/ 
    FAIL Alert!  If you've followed my Lubuntu install exactly as above, then you won't have "make" installed! (Maybe Lubuntu is weird...?) So I did:
         sudo apt-get install make
    Then, I had to re-run the "install rvm" command from https://rvm.io/rvm/install/ like this:
         curl -L https://get.rvm.io | bash -s stable --ruby
    This worked brilliantly (I think) but took a surprisingly long time!  (Did I mention my laptop was old?!)
    To double-check that everything is setup, you can confirm that your home directory now has a folder called ".rvm" and also your ".bashrc" file contains a last line something like:
         PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
    SUCCESS! 
    I wasn't sure that the rvm install worked properly, so I found this instruction, and running it made me feel much more successful than the above process. (Note: This probably just re-installed everything that was already good above.)
         rvm get head && rvm reinstall 1.9.3
    (I get the theory of rvm, but don't understand very well how it works.)

  5. Now, close the terminal window.  Open a new terminal window (to cause the above commands to be active in your new terminal window).

  6. At this point, I put everything on pause until I could get gedit installed.  I used it in the past, and so was willing to go back again.  I used the standard apt-get line:
         sudo apt-get install gedit
    With gedit working, I tried a few customizations that I found here.  These were designed to make gedit look more like TextMate for MacOSX.  They seemed to work well, although I have never used TextMate, so I don't know the comparison.  (Maybe ignorance is bliss, as my budget doesn't include getting a Mac anytime soon.)
         sudo apt-get install gedit-plugins
    The Monaco text link was broken, but it's freely available with a Google search.  I downloaded it to /home/{user}/Downloads and then used the following lines.  (Replace {user} with your username.)  The instructions said to put this in ~/.fonts, but since I didn't have one, I did it this way:
         cd  /home/{user}/Downloads
         sudo chown root.root MONACO.tff
         sudo mkdir /usr/share/fonts/truetype/monaco
         
    sudo mv MONACO.tff /usr/share/fonts/truetype/monaco/.

  7. Further to all of this, the Sudobits site suggested a "gedit-gmate" install.  I did this, but then gedit began failing.  I had no idea why gedit was failing but I uninstalled the gedit-gmate plugin and now gedit works fine (I think).

  8. I did manage to get the DarkMate theme installed.  Again, I downloaded it to my Downloads folder and then did:
         cd /usr/share/gtksourceview-3.0/styles/
         sudo cp /home/{user}/Downloads/darkmate.xml .
         sudo chown root.root darkmate.xml

    The DarkMate style then appeared in my gedit preferences.

  9. The tutorial directed me to a 7 month old installation guide (so taken with a grain of salt).  The guide directed me to install the following (all in one line):
         sudo apt-get install build-essential openssl libreadline6 libreadline6-dev zlib1g
                zlib1g-dev zlib libssl-dev libyaml-dev libxml2-dev libxslt-dev libc6-dev
                ncurses-dev autoconf automake libtool bison


  10. I tried to follow the standard for "rvm use 1.9.3" but all I get are warnings about not being able to use "rvm use ...". So I've givenup.  After all, I probably didn't need the rvm, as I only intend to have one install.  But I'm following tutorials, so I just assume that they know more than me.....   :-)

  11. Now the tutorial wants to install rails next, but I know (from last time) that I want to install my database first.  Last time, I used postgres database (sometimes called "PostgreSQL") and I had followed the instructions (with great explanations) here.
         sudo apt-get install postgresql postgresql-contrib libpq-dev
         
    sudo -u postgres createuser --superuser {dbusername}
       
     In psql mode:
                \password {dbusername}
                {enter your new password twice}
                \q                         {to quit}
         sudo -u postgres createdb admin
    I just want to use this as localhost, so postgres is setup!  However, I also like to have web access to administer postgres, so I also installed phppgadmin (and said "Y" to a whole slew of other programs upon which phppgadmin depends):
         sudo apt-get install phppgadmin
    Once this is done, you can check into your postgres database in a web browser.  Probably, apache isn't running, so get it started like this:
         sudo /etc/init.d/apache2 start       {or 'restart' if applicable}
    Then go to http://localhost/phppgadmin in your web browser.  
    (Remember your username and password!)


  12.  FAIL Alert!  At this point, I tried but failed with:
        gem install rails
    My error message said:
        ERROR:  While executing gem ... (Errno::EACCES)
        Permission denied - /var/lib/gems

    This was an odd error, since rvm is supposed to put the gems somewhere different (like ~/.rvm or ~/.gems)
    I'm unsure as to what strategy to try next, so I'll post here when I figure out what to do!


Maybe later, we can pick up at my older blog post to get a Rails App installed and ready to work on!


1 Comment
Martin link
19/2/2014 10:07:45 am

Why install Ruby both from RVM and apt-get? Won't this cause problems? It is much better to only use RVM.

Reply

Your comment will be posted after it is approved.


Leave a Reply.

    Author: Graham Rich

    Picture
    Technology teacher.
    Contact Mr. Rich

    Currently employed with 
    New Brunswick's Department of Education (also known as EECD)

    Experience: 
    - IT/BBT/Graphics (10 years)
    ​- Visual Arts (2 years)
    - Woodworking (2 years)
    - English 123 and Gr.9 (1 year)


    Latest Purchase:
    - Raspberry Pi (bought here)
    Favourite Software Tool:
    - Scratch (from MIT)
    - Vizwik (from AgoraMobile)
    Favourite Software Language:
    - Python

    Archives

    November 2016
    October 2016
    September 2015
    July 2015
    January 2015
    March 2014
    September 2013
    August 2013
    June 2012
    January 2012
    December 2011
    November 2011
    October 2011
    September 2011

    Categories

    All
    Aha
    C#
    Careers
    Cybersocial
    Employment
    Errors
    Fails
    Finding Work
    Firebug
    Fredericton
    Heroku
    Important
    Informal
    Install
    I.T.
    Javascript
    Jobs
    Jquery
    Learning
    Links
    Postgres
    Rails
    Rspec
    Sass
    Tdd
    Teaching
    Tutorials

    RSS Feed


Copyright © Graham Rich 2010-2023.   Site made using Weebly.com.