Difference between revisions of "Ruby Setup"

From CSE425S Wiki
Jump to navigation Jump to search
Line 208: Line 208:
  
 
==Check Installation==
 
==Check Installation==
 +
 +
'''NOTE: we no longer use tk so there is no longer a tk_check.rb to run'''
  
 
<youtube>7KN7NJ7VvNE</youtube>
 
<youtube>7KN7NJ7VvNE</youtube>

Revision as of 18:43, 25 August 2022

Language

Mac OSX

Note: depending on how the permissions are set up on your machine you may need to prefix a command with sudo or perhaps you may have to omit sudo.

Homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" 

Install Ruby

brew install ruby

Add Ruby To Path

if Mac OSX 10.15 Catalina or greater

   ~/.zshrc

else

   ~/.bash_profile

Add this line:

export PATH="/usr/local/opt/ruby/bin:$PATH"

check ruby

You can either

1) restart your terminal

or

2) source the appropriate configuration file based on your shell (which is often dependent on the OSX version)

source .zshrc

or

source .bash_profile

Then run

ruby --version

which should report version 2.7.2 as of Fall 2020.


OS Gem

sudo gem install os

PNG Gem

sudo gem install chunky_png

OpenGL Runtime

brew install glfw

OpenGL Gem

sudo gem install opengl-bindings

Opener Gem

sudo gem install opener

Windows

Ruby

Download and Install Ruby+Devkit 3.1.2-1 (x64)


OS Gem

gem install os

PNG Gem

gem install chunky_png

OpenGL Gem

gem install opengl-bindings

Zip Gem

gem install zip

OpenGL Runtime

NOTE: the first time you run one of the course's Ruby script which uses OpenGL, it will automatically download and extract FreeGLUT and GLFW3 to your ~/Downloads/CSE425s folder and use the files within.

Opener Gem

gem install opener

Linux

Ruby Language

Fedora
sudo dnf module install ruby:2.7
Ubuntu
sudo apt-get install ruby-full

OS Gem

sudo gem install os

PNG Gem

sudo gem install chunky_png

OpenGL Runtime

sudo apt-get update
sudo apt-get install libglu1-mesa-dev freeglut3-dev mesa-common-dev
sudo apt-get install libglfw3-dev

OpenGL Gem

sudo gem install opengl-bindings

Opener Gem

sudo gem install opener


IDE

Check Installation

NOTE: we no longer use tk so there is no longer a tk_check.rb to run


OpenGL

file to run: src//ruby/installation_check/opengl_check.rb Ruby logo.svg

Opengl installation check.png

OpenGL Texture

file to run: src//ruby/installation_check/opengl_texture_check.rb Ruby logo.svg

Opengl texture installation check.png