You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/ruby-on-rails/installation.md
+22-17Lines changed: 22 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,52 +7,50 @@ layout: learningpathall
7
7
---
8
8
9
9
## Install Ruby on Rails
10
-
In this section, you will learn how to install Ruby, Rails, and related tools (like rbenv and Bundler) on a SUSE Arm-based virtual machine. This guide will also cover installing the necessary dependencies to compile Ruby and run Rails applications smoothly.
11
-
10
+
In this section, you’ll install Ruby, Rails, and essential supporting tools on a SUSE Arm64 your Google Cloud C4A instance running SUSE Enterprise Linux. The steps ensure your environment is ready to build, deploy, and optimize Ruby on Rails applications on Arm-based infrastructure.
12
11
13
12
### Update System Packages
14
-
Updates all system packages to the latest versions to ensure stability and security.
13
+
Before installation, update all existing system packages. This ensures you have the latest security patches, compiler toolchains, and library versions compatible with Ruby.
15
14
16
15
```console
17
16
sudo zypper update
18
17
```
19
18
20
19
### Install Required Dependencies
21
-
These packages are essential for compiling Ruby and its native extensions.
20
+
Before installing Ruby, you need to install several core development libraries and tools. These packages ensure that Ruby and its native extensions compile and run correctly on your SUSE Arm64 environment.
**rbenv** is a lightweight Ruby version manager that allows multiple Ruby versions on the same system.
27
+
`rbenv` is a lightweight Ruby version manager that enables you to install and manage multiple Ruby versions on the same system. This is particularly useful for developers running different Rails applications that require specific Ruby versions.
- Clones the rbenv repository to manage Ruby versions
37
-
- Updates `PATH` so your shell can find rbenv
38
-
- Initializes rbenv in your shell session
35
+
With these steps you have cloned the `rbenv` repository to manage Ruby versions. Your `PATH` is updated so your shell can find rbenv. It then initializes rbenv in your shell session.
39
36
40
37
### Install ruby-build Plugin
41
-
**ruby-build** is an rbenv plugin that provides the `rbenv install` commandto compile and install different Ruby versions from source.
38
+
`ruby-build` is an rbenv plugin that adds the `rbenv` install command, allowing you to compile and install specific Ruby versions from source.
Installs Ruby and sets it as the default version for your environment.
45
+
Now that `rbenv` and `ruby-build` are set up, you can install Ruby and configure it as your system’s default version. This step compiles Ruby from source:
49
46
50
47
```console
51
48
rbenv install 3.4.6
52
49
rbenv global 3.4.6
53
50
ruby -v
54
51
```
55
-
- Installs Ruby 3.4.6 from source
52
+
With these commands you have:
53
+
- Installed Ruby 3.4.6 from source
56
54
- Sets it as the default Ruby version for your user
57
55
-`ruby -v` verifies the installed Ruby version
58
56
@@ -61,29 +59,36 @@ You should see output similar to:
Ruby 3.4.0 introduced significant performance enhancements, notably improvements to YJIT (Yet Another Ruby JIT), a Ruby just-in-time compiler. These enhancements are particularly beneficial for Arm architectures, as YJIT has been optimized to deliver better performance on such platforms. To leverage these improvements, it is recommended that you upgrade to Ruby 3.4.0 or later.
62
+
Ruby 3.4.0 and later introduced major performance enhancements, especially in YJIT (Yet Another Ruby JIT), Ruby’s Just-In-Time compiler. These enhancements are particularly beneficial for Arm architectures, as YJIT has been optimized to deliver better performance on such platforms. To leverage these improvements, it is recommended that you upgrade to Ruby 3.4.0 or later.
65
63
You can view [this release note](https://www.ruby-lang.org/en/news/2024/12/25/ruby-3-4-0-released/)
66
64
67
65
The [Arm Ecosystem Dashboard](https://developer.arm.com/ecosystem-dashboard/) recommends Ruby version 3.4.0, the minimum recommended on the Arm platforms.
68
66
{{% /notice %}}
69
67
70
68
### Install Bundler
71
-
**Bundler** manages Ruby project dependencies and ensures consistent gem versions across environments.
69
+
Bundler is Ruby’s dependency management tool. It ensures that all required gems (libraries) for your Rails application are installed and consistent across development, test, and production environments.
70
+
71
+
Install Bundler globally:
72
72
73
73
```console
74
74
gem install bundler
75
75
```
76
+
This command installs Bundler for the active Ruby version managed by rbenv.
76
77
77
78
### Install Rails
78
-
Rails is a full-stack web application framework for Ruby that simplifies building database-backed web applications with convention over configuration.
79
+
Rails is a full-stack web framework built in Ruby, designed for rapid development using convention over configuration principles.
80
+
Installing Rails on your SUSE Arm64 VM enables you to build and deploy web applications natively on Google Cloud Axion (C4A) processors.
79
81
80
82
```console
81
83
gem install rails
82
-
rails -v
83
84
```
84
-
- Installs the Rails framework
85
-
-`rails -v` verifies the installed Rails version
86
85
86
+
### Verify Rails version
87
+
Confirms that Rails is installed and accessible from your environment:
0 commit comments