Difference between revisions of "Ruby Setup"
(→Tk) |
(→OpenGL) |
||
(12 intermediate revisions by the same user not shown) | |||
Line 45: | Line 45: | ||
which should report version <code>2.7.2</code> as of Fall 2020. | which should report version <code>2.7.2</code> as of Fall 2020. | ||
+ | |||
+ | <!-- | ||
====Tk==== | ====Tk==== | ||
Line 57: | Line 59: | ||
* Download and Install [https://www.xquartz.org/ XQuartz] | * Download and Install [https://www.xquartz.org/ XQuartz] | ||
− | |* Download and Install [[Active_Tcl_Setup|Active Tcl 8.5]] | + | | |
+ | * Download and Install [[Active_Tcl_Setup|Active Tcl 8.5]] | ||
|- | |- | ||
− | | | + | |<code>gem install tk -- --with-tcl-include=/opt/R/arm64/include --with-tk-include=/opt/R/arm64/include --with-tcl-dir=/opt/R/arm64/lib --with-tk-dir=/opt/R/arm64 --with-X11-dir=/opt/X11 --with-tcllib=tcl8.6 --with-tklib=tk8.6</code> |
− | | | + | |<code>gem install tk</code> |
|} | |} | ||
+ | |||
+ | --> | ||
====OS Gem==== | ====OS Gem==== | ||
Line 70: | Line 75: | ||
====OpenGL Runtime==== | ====OpenGL Runtime==== | ||
+ | The Mac seems to have caused problems with installing OpenGL. Wait for an update on this coming soon. | ||
+ | |||
+ | <!-- | ||
<nowiki>brew install glfw</nowiki> | <nowiki>brew install glfw</nowiki> | ||
+ | --> | ||
====OpenGL Gem==== | ====OpenGL Gem==== | ||
Line 79: | Line 88: | ||
===Windows=== | ===Windows=== | ||
− | ====Ruby | + | ====Ruby==== |
− | + | Download and Install [https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.1.2-1/rubyinstaller-devkit-3.1.2-1-x64.exe Ruby+Devkit 3.1.2-1 (x64)] | |
+ | |||
+ | <!-- | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 103: | Line 114: | ||
| | | | ||
|} | |} | ||
+ | |||
+ | --> | ||
====OS Gem==== | ====OS Gem==== | ||
Line 123: | Line 136: | ||
===Linux=== | ===Linux=== | ||
+ | <!-- | ||
====ActiveTcl==== | ====ActiveTcl==== | ||
{{:Active_Tcl_Setup}} | {{:Active_Tcl_Setup}} | ||
− | + | --> | |
− | ====Ruby Language | + | ====Ruby Language==== |
=====Fedora===== | =====Fedora===== | ||
− | + | [https://developer.fedoraproject.org/tech/languages/ruby/ruby-installation.html install ruby] | |
=====Ubuntu===== | =====Ubuntu===== | ||
− | |||
− | |||
<nowiki>sudo apt-get install ruby-full</nowiki> | <nowiki>sudo apt-get install ruby-full</nowiki> | ||
− | + | <!-- | |
<nowiki>sudo gem install tk --with-ActiveTcl</nowiki> | <nowiki>sudo gem install tk --with-ActiveTcl</nowiki> | ||
+ | --> | ||
====OS Gem==== | ====OS Gem==== | ||
Line 199: | Line 212: | ||
==Check Installation== | ==Check Installation== | ||
+ | <!-- | ||
+ | '''NOTE: CSE 425s no longer uses tk so there is no longer a tk_check.rb to run.''' | ||
<youtube>7KN7NJ7VvNE</youtube> | <youtube>7KN7NJ7VvNE</youtube> | ||
− | |||
===Tk=== | ===Tk=== | ||
− | {{RubyToRun|tk_check|installation_check}} | + | {{RubyToRun|tk_check|installation_check|main}} |
[[File:Tk installation check.png]] | [[File:Tk installation check.png]] | ||
+ | --> | ||
===OpenGL=== | ===OpenGL=== | ||
− | {{RubyToRun|opengl_check|installation_check}} | + | |
+ | NOTE: Mac users will get an update shortly which should make this process work smoother. No need to test right now. | ||
+ | |||
+ | {{RubyToRun|opengl_check|installation_check|main}} | ||
[[File:Opengl installation check.png]] | [[File:Opengl installation check.png]] | ||
===OpenGL Texture=== | ===OpenGL Texture=== | ||
− | {{RubyToRun|opengl_texture_check|installation_check}} | + | {{RubyToRun|opengl_texture_check|installation_check|main}} |
[[File:Opengl texture installation check.png]] | [[File:Opengl texture installation check.png]] |
Revision as of 13:11, 27 August 2024
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
The Mac seems to have caused problems with installing OpenGL. Wait for an update on this coming soon.
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
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
- Apply for student status with JetBrains
- Download and Install RubyMine
- Ensure that the Ruby SDK and Gems setting is correctly configured
Check Installation
OpenGL
NOTE: Mac users will get an update shortly which should make this process work smoother. No need to test right now.
file to run: | src/main/ruby/installation_check/opengl_check.rb |
OpenGL Texture
file to run: | src/main/ruby/installation_check/opengl_texture_check.rb |