Quantcast
Viewing all articles
Browse latest Browse all 1318

RUBY - [Installing RVM on Linux]

RUBY

Update

$ gem update --system

Иногда требуется обновить только локальные пакеты

$ gem update --local

или воспользоваться bundler

$ bundle update

Uninstall

  • apt-get remove rubygems
  • apt-get remove ruby
  • cd /usr/local/lib/site_ruby/1.8
  • rm -r gauntlet_rubygems.rb rubygems.rb ubygems.rb rubygems
  • rm -r /usr/lib/ruby/gems/
  • rm /usr/bin/gem{,1.8}

Installing Ruby 1.9.2 and gems

  • apt-get install ruby1.9.1-full
  • update-alternatives --config ruby
  • update-alternatives --config gem
  • apt-get install ruby1.9.1-dev
  • apt-get install libxml2-dev
  • apt-get install libxslt1-dev
  • apt-get install libsqlite3-dev
  • REALLY_GEM_UPDATE_SYSTEM=1 gem update --system

Installing RVM on Linux

  • apt-get install build-essential
  • apt-get install curl
  • apt-get install zlib1g-dev libreadline-dev libssl-dev libxml2-dev
$ gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
$ \curl -sSL https://get.rvm.io |bash

~/.bashrc

[[-s"$HOME/.rvm/scripts/rvm"]]&& . "$HOME/.rvm/scripts/rvm"# This loads RVM
  • source ~/.bashrc
  • rvm requirements
  • rvm install 1.9.3

How do I upgrade my ruby 1.9.2-p0 to the latest patch level using rvm

  • rvm upgrade 1.9.2 1.9.2-p0
  • rvm update; rvm reload
  • rvm install ruby-1.9.2-p136
  • rvm --default ruby-1.9.2-p136 -
  • rvm get head -
  • rvm reload -

RubyGems + RVM + Ruby 2.1.5 + Bundler

Запускаем не из под root
  • sudo apt-get update
  • curl -L https://get.rvm.io | bash -s stable --rails
  • source ~/.rvm/scripts/rvm
  • rvm info # Смотрим что все ок
  • rvm install ruby-2.1.5 # Если необходимо поменять версию Ruby
  • gem install bundler
  • bundle install # В проекте при наличии Gemfile файла

GEM

  • gem list -d

RubyGems

  • apt-get install rubygems
  • gem install rubygems-update
  • update_rubygems --version=1.6.2
  • gem update --system 1.6.2
  • gem update --system

Проверка зависимостей

  • gem environment
  • gem install bundler
  • bundle install --without development test
  • ruby script/server -e production|development -d -p 3000 # -d - демон
  • ruby script/server thin|webrick -e production
  • ruby script/rails thin

Удаление пакетов

Rubygems >= 2.1.0

$ gem uninstall -aIx

Rubgems < 2.1.0

for i in`gem list --no-versions`; do gem uninstall -aIx$i; done

Bundle environment

Установка

bundle install

Окружение

cat ./.bundle
  ---
  BUNDLE_DISABLE_SHARED_GEMS: "1"
  BUNDLE_WITHOUT: development:test
  BUNDLE_PATH: .bundle

Запуск локально

bundle exec <<command>> <<params>>

Запуск консоли

bundle exec rails c  

Ошибки

После запуска установки rvm из под пользователя командой <text>\curl -L https://get.rvm.io | bash</text>. Процесс установки завершается с ошибкой.

mkdir: cannot create directory `/usr/local/rvm': Permission denied

Необходимо удалить базовые настройки, если они есть:

  • rm /etc/profile.d/rvm.sh - Тут прописано определение путей
  • rm /etc/rvmrc

Servers

Gems

Ссылки


Viewing all articles
Browse latest Browse all 1318

Trending Articles


EASY COME, EASY GO


HOY PANGIT, MAGBAYAD KA!


Girasoles para colorear


Presence Quotes – Positive Quotes


“Tado” Jimenez Quotes Collections Online


Papa Jack Tagalog Love Quotes and Advice for you


Top 10 Best Tagalog Friendship Quotes and Sayings | mrbolero


“Mali man na ikaw ay ibigin ko, akoy iibig padin sayo”


RE: Mutton Pies (frankie241)


Vimeo 10.7.0 by Vimeo.com, Inc.


FORECLOSURE OF REAL ESTATE MORTGAGE


Pokemon para colorear


Sapos para colorear


tagalog love Quotes – Tiwala Quotes


Long Distance Relationship Tagalog Love Quotes


5 Tagalog Relationship Rules


“BAHAY KUBO HUGOT”


Re:Mutton Pies (lleechef)


Ka longiing longsem kaba skhem bad kaba khlain ka pynlong kein ia ka...


Vimeo 10.7.1 by Vimeo.com, Inc.