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,150 points

reshown Feb 28, 2019 by Priyaj 1,406 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,140 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, 2022 in Others by Aditya
• 7,680 points
1,447 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, 2022 in Others by Kichu
• 19,040 points
405 views
0 votes
1 answer

How do I get it to select a single row based on the value?

Try this: Sub MoveBasedOnValue2() Dim ...READ MORE

answered Jan 20, 2023 in Others by narikkadan
• 63,600 points
591 views
0 votes
1 answer

How do I find top row visible on Sheet in Excel

Try this: ? Activewindow.VisibleRange.Row READ MORE

answered Jan 29, 2023 in Others by narikkadan
• 63,600 points
375 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,150 points
1,895 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
2,172 views
0 votes
1 answer

How to store cryptocurrency balance without causing floating point errors in ruby/rails

 I suggest storing the values as integers. ...READ MORE

answered Apr 7, 2022 in Blockchain by Aditya
• 7,680 points
621 views
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,140 points
6,593 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,140 points
1,087 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP