Ruby On Rails

From aoxoaWiki
Jump to navigationJump to search

Ruby on Rails is a business-level web development framework.

Topics

Installing RoR in Ubuntu 18.04

Installing RoR in Ubuntu 20.04 - FAILED

My first attempt to install failed. I am trying this approach now:

HowToForge: How to Install Ruby on Rails on Ubuntu 20.04 LTS

  gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 \
  7D2BAF1CF37B13E2069D6956105BD0E739499BDB
  curl -sSL https://get.rvm.io | bash -s stable --ruby
  source /home/dan/.rvm/scripts/rvm
  rvm get stable --autolibs=enable
  rvm version
  rvm install ruby-3.0.0
  or
  rvm reinstall ruby-3.0.0
  curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
  sudo apt-get install gcc g++ make
  sudo apt-get install -y nodejs
    1. To install the Yarn package manager, run:
  curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null
  echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
  sudo apt-get update && sudo apt-get install yarn
  gem update --system
  echo "gem: --no-document" >> ~/.gemrc
  gem install rails

ERROR: Failed to build gem native extension

Installing RoR in Ubuntu 20.04

That failed, so trying this

[https://gorails.com/setup/ubuntu/20.04#ruby-rbenv Install Ruby On Rails on Ubuntu 20.04 Focal Fossa]

  sudo apt install curl
  curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
  curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
  echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
  sudo apt-get update
  sudo apt-get install git-core zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 
  sudo apt-get install libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev nodejs yarn

install with rbenv

  cd
  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 3.0.0
  rbenv global 3.0.0
  ruby -v
  gem install bunder
  rbenv rehash
  gem install rails -v 6.1.1

THIS WORKED

Online Resources


Back to Main Page