Ruby On Rails

From aoxoaWiki
Jump to navigationJump to search

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


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:// --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 \
  curl -sSL | bash -s stable --ruby
  source /home/dan/.rvm/scripts/rvm
  rvm get stable --autolibs=enable
  rvm version
  rvm install ruby-3.0.0
  rvm reinstall ruby-3.0.0
  curl -sL | 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 | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null
  echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] 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

[ Install Ruby On Rails on Ubuntu 20.04 Focal Fossa]

  sudo apt install curl
  curl -sL | sudo -E bash -
  curl -sS | sudo apt-key add -
  echo "deb 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

  git clone ~/.rbenv
  echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
  echo 'eval "$(rbenv init -)"' >> ~/.bashrc
  exec $SHELL
  git clone ~/.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


Online Resources

Back to Main Page