Programming Taskbook


E-mail:

Password:

User registration   Restore password

Russian

SFedU

1100 training tasks on programming

©  M. E. Abramyan (Southern Federal University), 1998–2022

 

Examples | Ruby and Julia | Configuring IDE

PrevNext


Configuring IDEs for Ruby and Julia languages

This page briefly describes how to config the VS Code, RubyMine, and NetBeans IDEs for Ruby and also VS Code for Julia.

VS Code (Ruby)

1. Install the 32-bit Ruby SDK version 2.6.6-1 available at https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.6.6-1/rubyinstaller-devkit-2.6.6-1-x86.exe. During installation, select all suggested components.

2. At the final stage of the installation, select the option for additional MSYS2 configuration:

In the console window that appears, just press Enter in response to queries:

3. At the command prompt, go to the C:\Ruby26\bin subdirectory and run the command gem install ffi. If this command is successful, the following text should appear in the console window:

C:\Ruby26\bin>gem install ffi
Fetching ffi-1.13.1-x86-mingw32.gem
Successfully installed ffi-1.13.1-x86-mingw32
Parsing documentation for ffi-1.13.1-x86-mingw32
Installing ri documentation for ffi-1.13.1-x86-mingw32
Done installing documentation for ffi after 1 seconds
1 gem installed

4. Staying in the same directory, run the command gem install ruby-debug-ide.

5. Install VS Code https://code.visualstudio.com/download#, (Windows, 64 bit, User Installer or System Installer). If you select System Installer, the environment will be installed in the directory C:\Program Files, if you select User Installer, then the environment will be installed in the subdirectory of the current user directory, for example, C:\Users\<UserName>\AppData\Local\Programs\Microsoft VS Code.

6. Run the PT4Setup program (Start | All programs | Programming Taskbook 4 | PT4 Setup) and make sure that the taskbook has detected the Visual Studio Code (Ruby) IDE. If the path to the executable file Code.exe is not found by the taskbook, then specify it by clicking the Browse button. Close the PT4Setup program.

7. Run the PT4Load program, call its context menu (by right-clicking) and select the Visual Studio Code (Ruby) command In the Task field, enter the name of a task (for example, Begin1) and press [Enter] of click the Load button. The created template file will be loaded into the VS Code editor. The first time you load a file with the .rb extension, the VS Code editor will prompt you to install the Ruby language extension pack. When this extension pack is installed, you will be able to start Ruby programs from VS Code by pressing [F5].

As a result of the steps described above, the taskbook will be set up to be used with the VS Code environment for the Ruby language.

VS Code (Julia)

1. Install the 64-bit Julia SDK version 1.7.1 available at https://julialang-s3.julialang.org/bin/winnt/x64/1.7/julia-1.7.1-win64.exe. During installation, select all suggested components.

2. At the command prompt, go to the bin subdirectory of the Julia SDK directory (by default, the Julia SDK directory is located in the subdirectory of the current user directory, for example, C:\Users\<UserName>\AppData\Local\Programs\Julia-1.7.1), run the julia.exe file and, after loading of the Julia interpreter, execute the command:

import Pkg; Pkg.add("StringEncodings")

If this command is successful, the following text should appear in the console window:

julia> import Pkg; Pkg.add("StringEncodings")
  Installing known registries into `C:\Users\<UserName>\.julia`
    Updating registry at `C:\Users\<UserName>\.julia\registries\General.toml`
   Resolving package versions...
   Installed Libiconv_jll ---- v1.16.1+1
   Installed Preferences ----- v1.2.3
   Installed StringEncodings - v0.3.5
   Installed JLLWrappers ----- v1.4.0
  Downloaded artifact: Libiconv
    Updating `C:\Users\<UserName>\.julia\environments\v1.7\Project.toml`
  [69024149] + StringEncodings v0.3.5
    Updating `C:\Users\<UserName>\.julia\environments\v1.7\Manifest.toml`

3. Install VS Code https://code.visualstudio.com/download#, (Windows, 64 bit, User Installer or System Installer). If you select System Installer, the environment will be installed in the directory C:\Program Files, if you select User Installer, then the environment will be installed in the subdirectory of the current user directory, for example, C:\Users\<UserName>\AppData\Local\Programs\Microsoft VS Code.

4. Run the PT4Setup program (Start | All programs | Programming Taskbook 4 | PT4 Setup) and make sure that the taskbook has detected the Visual Studio Code (Julia) IDE. If the path to the executable file Code.exe is not found by the taskbook, then specify it by clicking the Browse button. Close the PT4Setup program.

7. Run the PT4Load program, call its context menu (by right-clicking) and select the Visual Studio Code (Julia) command In the Task field, enter the name of a task (for example, Begin1) and press [Enter] of click the Load button. The created template file will be loaded into the VS Code editor. The first time you load a file with the .jl extension, the VS Code editor will prompt you to install the Julia language extension pack. When this extension pack is installed, you will be able to start Julia programs from VS Code by pressing [F5].

As a result of the steps described above, the taskbook will be set up to be used with the VS Code environment for the Julia language.

RubyMine (Ruby)

1–4. Install and configure the 32-bit Ruby SDK version 2.6.6-1 by performing the steps 1–4 described in the VS Code (Ruby) subsection.

5. Install the RubyMine environment. It is recommended to use version 2020.2.2. Note that on the JetBrains website, students and teachers can get a free academic license to use the company's products including RubyMine. (https://www.jetbrains.com/community/education/#students).

6. After installing the RubyMine environment, launch it, run the command File | Settings..., go to Languages & Frameworks | Ruby SDK and Gems in the window that appears, and select ruby-2.6.6-p146 [i386-mingw32] in the list of Ruby SDK versions:

If this version is not available, click the "+" button at the top of the window to automatically search for installed versions of the Ruby SDK. If the automatic search did not yield results, use the New local... command from the menu associated with the "+" button to explicitly specify the path C:\Ruby26\bin to the Ruby interpreter.

After selection the required version of the Ruby SDK, close the window by clicking OK.

7. Run the PT4Setup program (Start | All programs | Programming Taskbook 4 | PT4 Setup) and make sure that the taskbook has detected the RubyMine IDE. If the path to the executable file rubymine64.exe was not found by the taskbook, then specify it by clicking the Browse button.

As a result of the steps described above, the taskbook will be set up to be used with the RubyMine environment for the Ruby language.

NetBeans IDE 6.9 (Ruby)

In the Programming Taskbook version 4.22, support for this environment was discontinued.

First, you need to install JDK package and NetBeans IDE (the NetBeans IDE 6.9 is available at the following link: http://download.netbeans.org/netbeans/6.9.1/final/bundles/netbeans-6.9.1-ml-javase-windows.exe).

Then you should install the Ruby plugin:

1. Run Tools | Plugins from the NetBeans main menu.

2. In the Plugins window, go to the Available Plugins tab, check the Ruby and Rails checkbox and press the Install button.

3. After finishing installation, restart the NetBeans IDE.

Then install the Ruby package (for example, http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.0.0-p451.exe?direct). During the installation, select all available components.

In the command-line mode, run the following command: gem install ffi (if the gem command fails, then go to the bin subdirectory of the Ruby system directory and run this command again).

After loading the Ruby project (named PT_Ruby) into the NetBEans IDE, you should define the Ruby Platform. Run the File | Project Properties command, select the Run section in the Properties dialog, and use the Ruby Platform combobox.

If the Ruby Platform combobox contains only Built-in JRuby item, then you should click the Manage button, click the Add Platform button in the new dialog, select the Ruby directory (for example, C:\Ruby193\bin), and select the ruby.exe file in this directory. After closing the Ruby Platform Manager dialog, you should select the Ruby 1.9.3-p448 item in the Ruby Platform combobox.

As a result of the steps described above, the taskbook will be set up to be used with the NetBeans IDE 6.9 for the Ruby language.

NetBeans IDE 7.2, 7.3, and 7.4 (Ruby)

In the Programming Taskbook version 4.22, support for this environment was discontinued.

First, you need to install JDK package and NetBeans IDE (the NetBeans IDE 7.4 is available at the following link: http://download.netbeans.org/netbeans/7.4/final/bundles/netbeans-7.4-javase-windows.exe).

Then you should download the Ruby plugin:

After plugin downloading, extract it to some directory (for example, c:\ruby_plugin).

Then run the NetBeans IDE and select Tools | Plugins from the NetBeans main menu.

In the Plugins window, go to the Settings tab and press the Add button.

In the Update Center Customizer window, enter the text Ruby in the Name textbox and enter the path to the plugin file updates.xml (for example, file:///c:/ruby_plugin/updates.xml) in the URL textbox.

Close the Update Center Customizer window by pressing the OK button and check the Ruby checkbox in the left-hand side of the Plugins window.

Then go to the Available Plugins tab, press the Reload Catalog button, and find the Ruby and Rails checkbox. Check this checkbox and press the Install button.

After finishing installation, restart the NetBeans IDE.

As a result of the steps described above, the taskbook will be set up to be used with the NetBeans IDEs 7.2, 7.3, and 7.4 for the Ruby language.

Remark. You can use external Ruby interpreter in the NetBeans 7.2–7.4 as well. For this purpose, you should install the Ruby package and select it as a Ruby platform for the PT_Ruby project (see the previous subsection).


PrevNext

 

  Рейтинг@Mail.ru

Designed by
M. E. Abramyan and V. N. Braguilevsky

Last revised:
19.04.2022