Is their any one who can help me to install ROR on elementary OS?
I am new on elementary OS. I want to install ruby on rails on my elementary OS.
can anyone please tell me how can i install ruby on rails on elementary OS.
Thank You
elementary OS Stack Exchange is a question and answer site for developers and users of elementary OS and applications. It only takes a minute to sign up.
Sign up to join this communityIs their any one who can help me to install ROR on elementary OS?
I am new on elementary OS. I want to install ruby on rails on my elementary OS.
can anyone please tell me how can i install ruby on rails on elementary OS.
Thank You
Run the following commands to install Ruby on rails
sudo apt install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev
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
git clone https://github.com/rbenv/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash
rbenv install 2.3.0
rbenv global 2.3.0
ruby -v
gem install bundler
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt install -y nodejs
gem install rails -v 4.2.6
rbenv rehash
PATH="$HOME/.rbenv/bin:$PATH"' bash: /home/smehsan/.bashrc: line 168:
esacexport PATH="$HOME/.rbenv/bin:$PATH"' smehsan@smehsan:~$
scratch-text-editor ~/.bashrc
and remove the last line and replace it with export PATH=$HOME/.rbenv/plugins/ruby-build/bin:$PATH
May 19, 2016 at 11:29
What Nguyen said worked for me.
Use a text editor and go to the root directory. (I'm using Sublime Text 3)
If you don't have one, you can use the following commands:
cd /
nano .bashrc
Scroll down to the end of the document, then create the line break (Enter in Windows/Linux)
It should look like this:
esac
# rbenv
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"
If you're using the 'nano' command, press Ctrl+O then Enter to save the document.
Press Ctrl+X to exit nano.
Thank you, Nguyen.
For someone who have problem with rbenv and bashrs, this code is worked for me. (We need 'enter' between esac and export)