Skip to content

Instantly share code, notes, and snippets.

1 - install-
group :test do
gem 'dox', require: false
end
** make sure you have data in your test database.
-----------------------------------------------
2- bundle
-----------------------------------------------
Install Neo->
1 - First install dotnet core
wget -q packages-microsoft-prod.deb https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get install apt-transport-https
sudo apt-get update
@nitsx2
nitsx2 / puma install error
Created June 28, 2018 07:22
An error occurred while installing puma (3.6.0), and Bundler cannot continue. Make sure that `gem install puma -v '3.6.0'` succeeds before bundling.
sometime puma has problem to install.
Reason -> because of SSL
ERROR--> An error occurred while installing puma (3.6.0), and Bundler cannot continue.
Make sure that `gem install puma -v '3.6.0'` succeeds before bundling.
SOLUTION -> DISABLE_SSL=true gem install puma
Specify the version if you have version specific requirement like:
REFERENCE LINK - https://github.com/OmniLayer/omnicore
Dependency Build Instructions: Ubuntu & Debian
1- Build requirements:
sudo apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils
Options when installing required Boost library files:
App 22342 stdout:
App 22342 stderr: [passenger_native_support.so] trying to compile for the current user (nobody) and Ruby interpreter...
App 22342 stderr: (set PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY=0 to disable)
[ E 2018-07-03 10:38:24.5794 22187/Tt age/Cor/App/Implementation.cpp:305 ]: Could not spawn process for application /home/sarupayposdevelopment-16072715-ror: An error occurred while starting up the preloader.
Error ID: 1b9b0e27
Error details saved to: /tmp/passenger-error-Yo4xtV.html
Message from application: could not find a temporary directory (ArgumentError)
/usr/local/rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tmpdir.rb:35:in `tmpdir'
/usr/local/rvm/gems/ruby-2.4.1/gems/passenger-5.2.3/src/ruby_supportlib/phusion_passenger/utils/tmpio.rb:28:in `new'
/usr/local/rvm/gems/ruby-2.4.1/gems/passenger-5.2.3/src/ruby_supportlib/phusion_passenger/native_support.rb:322:in `compile'
@nitsx2
nitsx2 / fix-ssl-cert-snakeoil.key-ubuntu-postgresql.sh
Created July 7, 2018 10:42 — forked from GabLeRoux/fix-ssl-cert-snakeoil.key-ubuntu-postgresql.sh
Fix postgresql error FATAL: could not access private key file "/etc/ssl/private/ssl-cert-snakeoil.key": Permission denied
# > It happened to me and it turned out that I removed erroneously the postgres user from "ssl-cert" group, set it back with
gpasswd -a postgres ssl-cert
# Fixed ownership and mode
sudo chown root:ssl-cert /etc/ssl/private/ssl-cert-snakeoil.key
sudo chmod 740 /etc/ssl/private/ssl-cert-snakeoil.key
# now postgresql starts! (and install command doesn't fail anymore)
sudo /etc/init.d/postgresql start
@nitsx2
nitsx2 / ror_setup.rb
Created July 9, 2018 08:46 — forked from rahulpuroht/ror_setup.rb
ROR_setup at amazon
1. sudo apt-get update
2. sudo apt-get install curl
3. Install RVM -
\curl -sSL https://get.rvm.io | bash
4. source ~/.rvm/scripts/rvm
5. rvm install 2.1.5
6. gem install rails --version=4.2.2
7. gem install passenger
8. sudo apt-get install libcurl4-openssl-dev
9. Adding SWAP -
Run this
"sudo -u postgres psql"
in your terminal to get into postgres
postgres=#
Run "CREATE USER new_username;"
Note: Replace new_username with the user you want to create,
Want to backup your MySQL database ?
MySQL provides a tool for dumping your database.
Use this command in your Rails Application.
mysqldump -uroot -p DB-NAME > backup.sql
DB-NAME is the name of your database.
This dumps your sql data into backup.sql file.
@nitsx2
nitsx2 / gist:0fb3ae632e34a4a40863f67d758a908b
Created October 10, 2018 12:40
Upload file to remote server using SCP
Upload file to remote server using SCP
scp /home/svnlabs.txt root@92.178.0.56:/home/