Difference between revisions of "Ruby Setup"
Line 72: | Line 72: | ||
{| class="wikitable" | {| class="wikitable" | ||
− | !colspan="2"| <=== Choose Path ===> | + | !colspan="2"| <=== Choose One Path ===> |
|- | |- | ||
− | | style="width: | + | | style="width: 34%; text-align:center;" | ↓ ↓ ↓ Path 3.1 (Ruby 3) ↓ ↓ ↓ |
− | | style="width: | + | | style="width: 33%; text-align:center;" | ↓ ↓ ↓ Path 2.7 (Ruby 2) ↓ ↓ ↓ |
+ | | style="width: 33%; text-align:center;" | ↓ ↓ ↓ Path 2.3 (Ruby 2 Legacy Version) ↓ ↓ ↓ | ||
|- style="vertical-align:top;" | |- style="vertical-align:top;" | ||
− | |Download and Install [https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller- | + | |1) Download and Install [https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.1.1-1/rubyinstaller-devkit-3.1.1-1-x64.exe Ruby+Devkit 3.1.1-1 (x64)] |
+ | |1) Download and Install [https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.7.5-1/rubyinstaller-2.7.5-1-x64.exe Ruby+Devkit 2.7.5-1 (x64)] | ||
|Download and Install [https://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.3.3-x64.exe Ruby 2.3.3 (x64)] | |Download and Install [https://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.3.3-x64.exe Ruby 2.3.3 (x64)] | ||
Line 86: | Line 88: | ||
[[File:RubyInstaller 233 with callout.png|400px]] | [[File:RubyInstaller 233 with callout.png|400px]] | ||
|- | |- | ||
− | |<code>gem install tk</code> | + | |2) <code>gem install tk</code> |
+ | |2) <code>gem install tk</code> | ||
| | | | ||
|} | |} |
Revision as of 17:26, 11 March 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.
Active Tcl 8.5
Install Active Tcl 8.5
Tk Gem
sudo gem install tk
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 + Tk
We have two possible paths to installing Ruby + Tk, both involve downloading from RubyInstaller.
<=== Choose One Path ===> | ||
---|---|---|
↓ ↓ ↓ Path 3.1 (Ruby 3) ↓ ↓ ↓ | ↓ ↓ ↓ Path 2.7 (Ruby 2) ↓ ↓ ↓ | ↓ ↓ ↓ Path 2.3 (Ruby 2 Legacy Version) ↓ ↓ ↓ |
1) Download and Install Ruby+Devkit 3.1.1-1 (x64) | 1) Download and Install Ruby+Devkit 2.7.5-1 (x64) | Download and Install Ruby 2.3.3 (x64)
Best sure to select:
|
2) gem install tk
|
2) gem install tk
|
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
ActiveTcl
Note: you will need to create an account to download ActiveTcl 8.5.
Note: ActiveTcl 8.6 has be known to cause problems.
Download and Install ActiveTcl 8.5
Ruby Language With Tk
Fedora
sudo dnf module install ruby:2.7
Ubuntu
A path that has worked on Ubuntu 20.04:
sudo apt-get install ruby-full
sudo gem install tk --with-ActiveTcl
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
- Apply for student status with JetBrains
- Download and Install RubyMine
- Ensure that the Ruby SDK and Gems setting is correctly configured
Check Installation
Tk
file to run: | src//ruby/installation_check/tk_check.rb |
OpenGL
file to run: | src//ruby/installation_check/opengl_check.rb |
OpenGL Texture
file to run: | src//ruby/installation_check/opengl_texture_check.rb |