How do I install Ruby on Rails?

0 votes
I want to use Ruby on Rails framework to create a web applications. Can anyone help me with its installation please?
Feb 28 in Others by Anvi
• 10,310 points

reshown Feb 28 by Priyaj 33 views
Can you please be more specific? You want to install it on WindowsOS or on Ubuntu or MacOS? Because for Windows its quite different and time consuming than for Ubuntu or MacOS.
I want to install it for Windows10. And I tried to install it but its asking for some Linux subsystem. Please someone tell me how to install it on windows without any hassle.

1 answer to this question.

0 votes

Hi @Anvi, what @Pratibha has mentioned is true. For Ubuntu installation is quite simpler as you just have to type in some commands only, but installing RoR on WindowsOS is a bit tricky task. For that I am going to show you the step by step installation process:

  1. Open Settings >> Navigate to Update & Security >> Tap on For Developers >> Click on Developer Mode:

     
  2. Open Control Panel >> Go to Programs >> Click Turn Windows Features On or Off >> Tick the Checkbox for Windows Subsystem for Linux:  

     
  3. Now open Microsoft Store >> Search for Ubuntu >> Click on Get to install the Ubuntu for Windows app: 

     
  4. Open the Ubuntu app and it will show a screen like this. Now you first have to create a 'Unix User Account'. For that, enter the new 'Unix Username' and a new 'Unix Password'. You can use one word username and any password to setup this new user account : 

     
  5. After successful creating of account you will get this screen. Now you can simply follow Ubuntu Setup steps to install ruby and rails: 

     
  6. Now write the following commands one by one to install Ruby 2.6.1 :
    >> sudo apt-get update
    >> sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev
    
    >> git clone https://github.com/rbenv/rbenv.git ~/.rbenv
    >> echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
    >> echo 'eval "$(rbenv init -)"' >> ~/.bashrc
    >> exec $SHELL
    
    >> git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
    >> echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
    >> exec $SHELL
    
    >> rbenv install 2.6.1
    >> rbenv global 2.6.1
    >> ruby -v
    >> gem install bundler
    
    
  7. To install Rails 5.2.2, write the following commands one by one on Ubuntu terminal:

    >> curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
    >> sudo apt-get install -y nodejs
    
    >> gem install rails -v 5.2.2
    >> rbenv rehash
    
    >> rails -v
  8. By typing the last command you should be able to see the rails version which you have installed. And that's it. You have successfully installed the Rails framework on your windows10 machine.

answered Feb 28 by Abha
• 16,440 points

Related Questions In Others

0 votes
1 answer

How do I carry out functional testing?

Well, functional testing is pretty simple. it ...READ MORE

answered Feb 18 in Others by Jobin
15 views
0 votes
1 answer

Golang on Linux... How to install it?

Hey @Abhi, if you want to install ...READ MORE

answered Mar 1 in Others by Anvi
• 10,310 points
57 views
0 votes
1 answer

How do I start studying Node.JS to create a restful API?

Node.js is an open source server environment ...READ MORE

answered Jun 10 in Others by ArchanaNagur
• 2,190 points
25 views
0 votes
2 answers

How do neural networks used in AI and deep learning learn?

A neural network is a hardware or software ...READ MORE

answered Apr 8 in Others by SA
• 1,030 points
68 views
0 votes
1 answer
0 votes
1 answer

How to do Installation of Ruby on Rails on Linux (Ubuntu)?

Hi Pratibha, installing ROR on ubuntu is ...READ MORE

answered Mar 1 in Others by Anvi
• 10,310 points
43 views
0 votes
1 answer

How do I install factor and puppet using Ruby Gem?

Hey @Kiara, execute these commands to install ...READ MORE

answered Mar 8 in Puppet by Yogesh
28 views
0 votes
1 answer

Why we are configuring mapred.job.tracker in YARN?

I really dont know the reason behind ...READ MORE

answered Mar 29, 2018 in Big Data Hadoop by Ashish
• 2,630 points
163 views
0 votes
1 answer

Perl Install on Ubuntu

Hi Ashmita, on every ubuntu machine, perl ...READ MORE

answered Mar 1 in Others by Abha
• 16,440 points
29 views
0 votes
1 answer

Installing PHP on Ubuntu

Hi Vijay, althought its not necessary to ...READ MORE

answered Mar 1 in Others by Abha
• 16,440 points
17 views