Last active
June 8, 2018 03:59
-
-
Save rjsnh1522/5d66532068e71d7fad88e62138afe583 to your computer and use it in GitHub Desktop.
New Environment installations for rails development in ubuntu and mac
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
===================================INSTALL CHROMIUM============================== | |
# install chromium | |
$ sudo apt-get install chromium-browser | |
===================================INSTALL rvm============================== | |
$ gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 | |
$ \curl -sSL https://get.rvm.io | bash -s stable --ruby | |
$ rvm install ruby / this will install the ruby with whatever mentioned version | |
$ source ~/.rvm/scripts/rvm | |
(or) | |
*visit the following links | |
https://rvm.io/rvm/install | |
* if the following erros occurs means | |
Error running 'requirements_debian_libs_install gawk libgmp-dev libgmp-dev', | |
showing last 15 lines of /home/kuttysaathan/.rvm/log/1497414707_ruby-2.4.0/package_install_gawk_libgmp-dev_libgmp-dev.log | |
--- | |
$ rvm autolibs disable // run this command for if the above erros occurs | |
$ rvm install ruby -v 2.2.0 | |
# install rails | |
sudo apt-get install ruby-railties-4.0 | |
===================================INSTALL vim============================== | |
$ sudo -s // move into root | |
# apt-get install vim // install command for vim editor | |
===================================INSTALL postgres============================== | |
link: https://www.postgresql.org/download/linux/ubuntu/ | |
===================================INSTALL git============================== | |
sudo apt-get install git | |
===================================INSTALL sublime text============================== | |
visti this link => https://askubuntu.com/questions/521265/how-to-install-sublime-text-2-instead-of-3-from-webupd8team-ppa | |
=============================error faced during bundle install =============== | |
ERROR:1 | |
An error occurred while installing pg (0.19.0), and Bundler cannot continue. | |
Make sure that `gem install pg -v '0.19.0'` succeeds before bundling. | |
sol: | |
$ sudo apt-get install libpq-dev | |
-- | |
ERROR:2 | |
An error occurred while installing rmagick (2.15.3), and Bundler cannot continue. | |
Make sure that `gem install rmagick -v '2.15.3'` succeeds before bundling. | |
sol: | |
$ sudo apt-get install imagemagick | |
$ sudo apt-get install libmagick++-dev | |
*if the same problem occurs again and again means | |
sol: | |
brew update | |
brew rm imagemagick | |
brew install imagemagick@6 | |
brew link imagemagick@6 --force | |
bundle | |
then | |
$ bundle | |
ERROR:3 | |
ERROR: Loading command: install (LoadError) | |
cannot load such file -- zlib | |
ERROR: While executing gem ... (NoMethodError) | |
undefined method `invoke_with_build_args' for nil:NilClass | |
sol: | |
$ sudo apt-get install zlib1g-dev | |
$ rvm reinstall ruby-2.3.0 | |
ERROR:4 | |
ERROR: While executing gem ... (Gem::Exception) | |
Unable to require openssl, install OpenSSL and rebuild ruby (preferred) or use non-HTTPS sources | |
sol: | |
$ brew update | |
*It shows another error | |
No command 'brew' found, did you mean: | |
Command 'qbrew' from package 'qbrew' (universe) | |
Command 'brec' from package 'bplay' (universe) | |
brew: command not found | |
*To install the brew visit the following url's | |
http://linuxbrew.sh/ | |
$ brew doctor | |
$ brew install openssl | |
$ rvm install ruby-2.3.0 | |
ERROR:5 | |
$ bundle // it will show install the below command,so we need to install the bundler | |
$ sudo apt-get install bundler | |
ERROS:6 | |
An error occurred while installing mysql2 (0.3.21), and Bundler cannot continue. | |
Make sure that `gem install mysql2 -v '0.3.21'` succeeds before bundling. | |
ERROR:7 | |
An error occurred while installing mysql2 (0.3.21), and Bundler cannot continue. | |
Make sure that `gem install mysql2 -v '0.3.21'` succeeds before bundling. | |
sol: | |
$ sudo apt-get install mysql-client libmysqlclient-dev | |
ERROR:8 | |
rake aborted! | |
Bundler::GemRequireError: There was an error while trying to load the gem 'uglifier'. | |
Gem Load Error is: Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes. | |
sol: | |
$ sudo apt-get install nodejs | |
ERROR:9 | |
An error occurred while installing nokogiri (1.6.8), and Bundler cannot continue. | |
Make sure that `gem install nokogiri -v '1.6.8'` succeeds before bundling. | |
sol: | |
ERROR10 | |
LoadError: libMagickCore-6.Q16.so.4: cannot open shared object file: No such file or directory | |
sol: | |
* Just remove the rmagick gem from Gemfile | |
* manually install the rmagick gem | |
gem install rmagick // this will install the rmagick gem | |
===========================create a new rails application=============== | |
$ rails new application_name | |
-It shows some errors, | |
$ gem install rails // is used to install the rails | |
-It will install the rails-5.1.1 | |
_for use postgres database ,we need to mention the gem pg | |
$ vi Gemfile | |
gem 'pg' | |
errors: | |
$ rake // it shows some errors | |
rake aborted! | |
Bundler::GemRequireError: There was an error while trying to load the gem 'uglifier'. | |
--- | |
*it is due to javascript errors | |
$ sudo apt-get install nodejs // it will install the nodejs | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment