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, 2019 in Others by Anvi
• 14,170 points

reshown Feb 28, 2019 by Priyaj 263 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.

+1 vote

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 Mar 1, 2019 by Abha
• 28,100 points

Related Questions In Others

0 votes
1 answer

How do I display an alert dialog on Android?

You could use an AlertDialog for this ...READ MORE

answered Feb 22 in Others by Aditya
• 7,280 points
55 views
0 votes
0 answers

How do I get data storage used on my AWS RDS?

I wish to know how much storage ...READ MORE

Apr 9 in Others by Kichu
• 15,250 points
19 views
0 votes
1 answer

How do I carry out functional testing?

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

answered Feb 18, 2019 in Others by Jobin
169 views
0 votes
1 answer

Golang on Linux... How to install it?

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

answered Mar 1, 2019 in Others by Anvi
• 14,170 points
311 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, 2019 in Others by Anvi
• 14,170 points
796 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, 2019 in Puppet by Yogesh
987 views
0 votes
1 answer
0 votes
1 answer

Perl Install on Ubuntu

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

answered Mar 1, 2019 in Others by Abha
• 28,100 points
3,693 views
0 votes
1 answer

Installing PHP on Ubuntu

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

answered Mar 1, 2019 in Others by Abha
• 28,100 points
265 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP