Install ruby 2.1.5 via rbenv - centos

I already have rbenv version 0.4.0-97-gfe0b243 installed, that manages ruby version 2.1.1
Now, I also want it to manage ruby 2.1.5
But, when I do rbenv install --list then I see max ruby 2.1.2 and then 2.2.0-dev. What should I do for getting version 2.1.5 ?

The following code helped me get over the situation.
GOTO
cd ~/.rbenv/plugins/ruby-build
git pull
Now I can see 2.1.5 also listed in rbenv install --list

You can perform an upgrade on ruby-build.
$ brew update
$ brew upgrade rbenv ruby-build
$ rbenv install --list

Note: I have tested the following procedure on Ubuntu 16.04, it work for me. I am assuming that you have already installed the rbnev on your system successfully. To check is it working properly or not? run the command rbenv -v
it will give you output like this.
rbenv 1.0.0-33-gc7dcaf1
but in your System the version of rbenv version may be different.
Run the following command to install required version of ruby.
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
rbenv install --list
select appropiate available of ruby as per your requirement 2.1.5
rbenv install 2.1.5
rbenv global 2.1.5
rbenv rehash
ruby -v

Related

How to enable Xdebug on local Macbook?

Need Xdebug extension enabled in my local development environment.
PHP Version: PHP 8.0.10 (CLI)
OS: Mac ( Chip Apple M1 )
Let me summarize the steps that worked for me always.
Reconfirm x-debug installation on the local work desk or enabled in php.ini by running the following command:
➜ ~ PHP -v
Run the below command to install x-debug:
On Apple M1 hardware, you might instead need to use:
➜ ~ arch -arm64 sudo pecl install xdebug
If you have different architecture, below might be suitable.
➜ ~ arch -x86_64 sudo pecl install xdebug
Note: I had installed PHP using Homebrew before like :
➜ ~ brew install php
Now, with above #2, X-debug should be installed and enabled in php.ini.
You might get something similar as below:
Build process completed successfully
Installing '/opt/homebrew/Cellar/php/8.0.10/pecl/20200930/xdebug.so'
install ok: channel://pecl.php.net/xdebug-3.0.4
Extension xdebug enabled in php.ini
Tips:
Usecase 1: Xdebug installed but not enabled in php.ini.
Steps:>
(a) Read the PHP ini file loaded, active with below.
➜ ~ PHP --ini
(b) Use vi editor and add the following line to php.ini: zend_extension="xdebug.so"
( Note: You may also provide the path instead of just xdebug.so. For example, my local machine path is something like this:- /opt/homebrew/Cellar/php/8.0.10/pecl/20200930/xdebug.so
(c) Save and exit editor and try php -v again to confirm x-debug enabled.
Usecase 2: You had run pecl command with the wrong architecture mentioned.
(a) Uninstall x-Debug with below command:
➜ ~ sudo pecl uninstall xdebug
(b) Re-run install command as shared in Step 2 above with caution using correct architecture.

Uninstall older unixODBC completely and install 2.3.2 unixODBC in redhat 6.3

I am trying to install msodbcsql v13 in redhat 6.3. It shows dependency error for unixODBC(64 bit) >= 2.3.1 needs to be installed before installing msodbcsql.
I tried running below command,
odbcinst -j
It shows unixODBC 2.3.2 is installed.
Also i tried to some other way,
yum provides /usr/lib64/odbcinst.so.2.0.0
The above command shows, ODBC version 2.2 is installed.
Also if i run yum local install, it shows unixODBC 32 bit version available in machine.
To remove unixODBC, i tried the below commands. But not works out.
yum remove unixODBC
yum erase unixODBC
rpm -e unixODBC*
rpm rpm -qa | grep unixODBC
I want to remove all unixODBC available in the machine. And reinstall the actual version which we required.
Manual Installation
Remove any older installed version of unixODBC (for example, unixODBC 2.2.11). On Red Hat Enterprise Linux 5 or 6, execute the following command: yum remove unixODBC. On SUSE Linux Enterprise, zypper remove unixODBC.
Go to http://www.unixodbc.org. Click the Download link on the left side of the page to go to the download page. Then click the appropriate link to save the file unixODBC-2.3.0.tar.gz to your computer. UnixODBC-2.3.1 is not supported with this release of the Microsoft ODBC Driver 11 for SQL Server.
On your Linux computer, execute the command: tar xvzf unixODBC-2.3.0.tar.gz.
Change to the unixODBC-2.3.0 directory.
At a command prompt, execute the command: CPPFLAGS="-DSIZEOF_LONG_INT=8".
At a command prompt, execute the command: export CPPFLAGS.
At a command prompt, execute the command: "./configure --prefix=/usr --libdir=/usr/lib64 --sysconfdir=/etc --enable-gui=no --enable-drivers=no --enable-iconv --with-iconv-char-enc=UTF8 --with-iconv-ucode-enc=UTF16LE".
At a command prompt (logged in as root), execute the command: make.
At a command prompt (logged in as root), execute the command: make install.
For additional info - visit the site
To remove all unixODBC related packages, run:
sudo yum remove unixODBC*
To install newer version of unixODBC, try to install unixODBC-utf16 package.
Here are the suggested commands:
curl -s https://packages.microsoft.com/config/rhel/7/prod.repo | sudo tee /etc/yum.repos.d/msprod.repo
sudo yum update
sudo yum info unixODBC*
sudo yum install unixODBC-utf16
See also: Install the SQL Server command-line tools on Linux.
If above won't help, check: How to install Microsoft Drivers for PHP for SQL Server on Amazon Linux AMI.

Grunt need compass installed in system PATH Warning

I want to install Yeoman, Grunt and bower to my node project.
I made a node project in Eclipse (using the nodeclipse plugin) and navigated to the project folder
(which is H:\Eclipse Workspace\YoTest) in cmd and typed in:
npm install yo -g
npm install generator-webapp -g
yo webapp
selected: Sass (with compass), in cmd
And then typed:
grunt serve
to run the webapp.
I get the following error message:
Done, without errors.
Warning: Running "compass:server" (compass) task
Warnin: You need to have Ruby and Compass installed and in your system PATH for
this task to work. More info: https://github.com/gruntjs/grunt-contrib-compass
Use --force to continue.
Aborted due to warnings. Use --force to continue.
Aborted due to warnings.
How do I fix this so that I can run my node project with grunt?
PS: I'm not sure if it has anything to do with the problem, but I also get the following errors on line 1-27 in my package.json:
Multiple markers at this line
- strings must use singlequote
- strings must use singlequote
This is my package.json
{
"name": "yotest2",
"version": "0.0.0",
"dependencies": {},
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-copy": "~0.4.1",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-uglify": "~0.2.0",
"grunt-contrib-compass": "~0.7.0",
"grunt-contrib-jshint": "~0.7.0",
"grunt-contrib-cssmin": "~0.7.0",
"grunt-contrib-connect": "~0.5.0",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-htmlmin": "~0.1.3",
"grunt-bower-install": "~0.7.0",
"grunt-contrib-imagemin": "~0.2.0",
"grunt-contrib-watch": "~0.5.2",
"grunt-rev": "~0.1.0",
"grunt-autoprefixer": "~0.5.0",
"grunt-usemin": "~2.0.0",
"grunt-mocha": "~0.4.0",
"grunt-modernizr": "~0.4.0",
"grunt-newer": "~0.6.0",
"grunt-svgmin": "~0.2.0",
"grunt-concurrent": "~0.4.0",
"load-grunt-tasks": "~0.2.0",
"time-grunt": "~0.2.0",
"jshint-stylish": "~0.1.3"
},
"engines": {
"node": ">=0.8.0"
}
}
I'm on Windows.
The warning seems to say it all.
If you're on OS X or Linux you probably already have Ruby installed; test with ruby -v in your terminal. When you've confirmed you have Ruby installed, run gem update --system && gem install compass to install Compass and Sass.
If that doesn't help, then install the grunt-contrib-compass package with the instructions at https://github.com/gruntjs/grunt-contrib-compass
I struggled for hours with this same error message when running a gulp watch, and despite installing, reinstalling, rebooting, it would still show up.
Got it working by uninstalling all my packages :
sudo gem uninstall bundler bundle compass sass compass-core compass-import-once
And installing bundle only
sudo gem install bundle bundler
And then run the command that magically installed everything I needed :
$ bundle
Fetching gem metadata from https://rubygems.org/...........
Fetching version metadata from https://rubygems.org/..
Installing sass 3.4.9
Installing sassy-maps 0.4.0
Installing breakpoint 2.5.0
Installing hitimes 1.2.2
Installing timers 4.0.1
Installing celluloid 0.16.0
Using chunky_png 1.3.3
Using multi_json 1.10.1
Installing compass-core 1.0.1
Using compass-import-once 1.0.5
Using rb-fsevent 0.9.4
Using ffi 1.9.6
Using rb-inotify 0.9.5
Installing compass 1.0.1
Installing json 1.8.1
Installing listen 2.8.3
Installing thor 0.19.1
Installing fontcustom 1.3.7
Installing modular-scale 2.0.5
Installing normalize-scss 3.0.2
Installing sass-css-importer 1.0.0.beta.0
Installing sassy-buttons 0.2.6
Installing susy 2.1.3
Using bundler 1.8.0
Bundle complete! 9 Gemfile dependencies, 24 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
Post-install message from compass:
Compass is charityware. If you love it, please donate on our behalf at http://umdf.org/compass Thanks!
Post-install message from fontcustom:
>> Thanks for installing Font Custom! Please ensure that fontforge is installed before compiling any icons. Visit <http://fontcustom.com> for instructions.
Now, don't ask me why, but it all works :-)
Hope that can help anybody out there, I really struggled on this one ...
Just need to write on console -> (or sudo )gem install compass ,because the npm command wouldn´t do anything
For Mac OS X 10.10 (Yosemite)
Search for installed ruby version
ruby -v.
If present
update gems using sudo gem update --system
else install rvm with ruby using
\curl -sSL https://get.rvm.io | bash -s stable --ruby
Then install the Xcode Command Line Tools
xcode-select --install .
This will take some time.
Now install compass using sudo gem install compass.
For me this worked like a charm.
Ruby and Ruby Gems ought to be installed which in turn facilitate the installation of Sass and compass. Check this out http://hecktechsolutions.blogspot.in/2015/03/installation-of-gems-compass-and-sass.html

Error "the PGXS Makefile cannot be found" when installing PostGis on Debian

I am in the process of installing PostGis over psql on a Debian machine (actually crunchbang).
I have completed the following steps:
$ wget http://download.osgeo.org/postgis/source/postgis-2.0.3.tar.gz
$ tar xzf postgis-2.0.3.tar.gz
$ cd postgis-2.0.3
$ ./configure
On the final step I get the following error:
configure: error: the PGXS Makefile /usr/lib/postgresql/9.1/lib/pgxs/src/makefiles/pgxs.mk cannot be found. Please install the PostgreSQL server development packages and re-run configure.
The issue is that I do already have Postgres installed:
$ psql --version
psql (9.1.9)
I have checked this on two machines with the same configuration and get the same error. What am I missing here?
PostgreSQL is broken down into several packages, and having psql installed doesn't imply that the development packages are also installed.
According to the error message:
Please install the PostgreSQL server development packages and re-run
configure
you need:
# apt-get install postgresql-server-dev-9.1
Also note there's a APT pgdg repository providing recent pre-compiled versions of postgres-related packages (including postgis) that you may use instead of self-compiling.
If your system is set up to use this repository, just do:
# apt-get install postgresql-9.1-postgis-2.0
Daniel's answer works great except that it needs the following update:
$ sudo apt-get install postgresql-9.1-postgis-2.1
These packages can be updated some time in future again. So, it is recommended to search for new packages using aptitude and install the appropriate one:
$ aptitude search postgis

Installing LuaMongo on Ubuntu 11.10

I have researched and viewed the post to install luamongo- http://groups.google.com/group/luamongo/browse_thread/thread/1eaa56974614dc90/c91c842e241aa4de#c91c842e241aa4de
But the installation will not work. I already have mongodb-10gen version 2.0.3 and lua5.1 version 5.1.4.10 installed.
How do I download luamongo from https://github.com/moai/luamongo and install it and get it working as an import statement in a lua script to be able to write to a mongo db? Any suggestions would be helpful, nothing I have tried so far or read has been able to help. If more information is needed I will post it. Thanks in advance.
I got this script from a friend of mine which should be helpful:
# Download mongodb and driver
wget http://downloads.mongodb.org/cxx-driver/mongodb-linux-x86_64-v2.0-latest.tgz
wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.0.2.tgz
# Extract each
tar xvzf mongodb-linux-x86_64-2.0.2.tgz
tar xvzf mongodb-linux-x86_64-v2.0-latest.tgz
# Add mongo bin to PATH
export PATH=$PATH:~/mongodb-linux-x86_64-2.0.2/bin
# Grab dev tools and dependencies (May need to run apt-get update to download all)
sudo apt-get -y install tcsh scons libpcre++-dev libboost-dev libreadline-dev libboost-program-options-dev libboost-thread-dev libboost-filesystem-dev libboost-date-time-dev gcc g++ git lua5.1-dev make
# Grab latest luamongo (will need to add your github ssh key)
git clone git#github.com:moai/luamongo
# Compile mongo driver
cd mongo-cxx-driver-v2.0
sudo scons install
# Install where lua can load it
sudo cp libmongoclient.* /usr/lib