codeigniter 3.0.6 gives error
mysqli::real_connect(): Headers and client library minor version mismatch. Headers:50614 Library:50544
I had the same problem when i updated my mysql server or client version, what you have to do is install mysqlnd, you can use
yum install php54-mysqlnd
it depends on your php version, you can check it using phpinfo(); or running php -i on bash
I have old RoR applications working fine with Postgresql 9.1, on my Mac with Ruby 2.0.0 and Rails 4.0.2
Now I have to do another project and I want to use latest ruby and rails version:
=> ruby-2.2.3#4.2.5 [ x86_64 ]
I can install pg gem without problems I have in config file (insdide .bundle) this
BUNDLE_BUILD__PG: --with-pg-config=/Library/PostgreSQL/9.1/bin/pg_config
Bu when I run "rake db:create" or "rails s" I get this error:
LoadError: dlopen(/Users/albertcatalacasulleras/.rvm/gems/ruby-2.2.3#4.2.5/extensions/x86_64-darwin-14/2.2.0-static/pg-0.18.4/pg_ext.bundle, 9): Library not loaded: libz.1.2.6.dylib
Referenced from: /Users/albertcatalacasulleras/.rvm/gems/ruby-2.2.3#4.2.5/extensions/x86_64-darwin-14/2.2.0-static/pg-0.18.4/pg_ext.bundle
Reason: image not found - /Users/albertcatalacasulleras/.rvm/gems/ruby-2.2.3#4.2.5/extensions/x86_64-darwin-14/2.2.0-static/pg-0.18.4/pg_ext.bundle
I think there is something in Rails 4.2.5 or in Ruby 2.2.3 that makes this crash.
Thanks in advance
Thanks to this answare of Craig Ringer I found the solution:
Adding export DYLD_LIBRARY_PATH=/library/PostgreSQL/9.1/lib:$DYLD_LIBRARY_PATH
to .bash_rofile file
another issue it would be having two PstgreSQL databases 9.1 and 9.4, por example...
I faced the same type of issue and it is solved for me by uninstalling the pg gem and install it again with the options as like below.
sudo gem install pg -- --with-pg-config=/Applications/Postgres.app/Contents/Versions/9.4/bin/pg_config
Search for the pg_config file in the installation path of you postgres app and give that path as shown above.
Please refer the following url for more details.
Github url link
I want to generate models with bake terminal command. CakePhp 3 is able to connect to my postgres database. All PHP extensions for postgres are activated (php_pdo_pgsql, php_pgsql). I checked php.ini.
When I run the command: cake bake model
I have this error:
Exception: Database driver Cake\Database\Driver\Postgres cannot be used due to a missing PHP extension or unmet dependency in [C:\wampPI\www\ticketHellocom\vend
or\cakephp\cakephp\src\Database\Connection.php, line 171]
You need to install the pdo_pgsql module for your php installation and activate the extension in your php.ini.
I'm trying to install the rackspace plugin for vagrant (1.5.1):
vagrant plugin install vagrant-rackspace
But it complains
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:
An error occurred while installing nokogiri (1.6.1), and Bundler
cannot continue. Make sure that gem install nokogiri -v '1.6.1'
succeeds before bundling.
However gem install nokogiri -v '1.6.1' and /Applications/Vagrant/embedded/bin/gem install nokogiri -v '1.6.1' both work.
I've looked at a bunch of SO threads and blog posts. Things I've tried that have not worked
Running xcode-select --install
Installing full xcode
brew install gcc-4.2
Remove rvm and rvm version of ruby
Install nokogiri w/ built-in (mac) ruby and vagrant-embedded ruby
Despite the fact that nokogiri installs fine (#5 above) without sudo on both counts, vagrant plugin install vagrant-rackspace still fails...
So, in summary, I can install the nokogiri plugin, however I cannot install the vagrant rackspace plugin, can you help me get the plugin installed?
Related threads
Error to install Nokogiri on OSX 10.9 Maverick?
nokogiri - ERROR: Failed to build gem native extension
Full output of vagrant plugin install vagrant-rackspace --debug
I'm on OSX Mavericks and this worked for me:
Set as environment property:
NOKOGIRI_USE_SYSTEM_LIBRARIES=1
Then install as usual:
vagrant plugin install vagrant-rackspace
Vagrant ships with embedded Ruby and isolated gem environment. So installing gems manually to your "normal" gem environment won't help.
The first issue is that you should never use sudo to run any vagrant command. If possible, please remove ~/.vagrant.d/ or at least chown it recursively back to your own user. You could also try upgrading Vagrant to v1.5.1.
Then please gist/pastebin the output of vagrant plugin install vagrant-rackspace --debug and ~/.vagrant.d/gems/gems/nokogiri-1.6.1/ext/nokogiri/mkmf.log.
The posted solutions didn't work for me. Instead I needed to specify the libxml2, libxslt and libiconv that I installed with homebrew (Do this first).
I installed the gem manually with the embedded ruby with the following [very concise] command line:
/Applications/Vagrant/embedded/bin/gem install \ # select the embedded ruby
--install-dir ~/.vagrant.d/gems \ # install to the vagrant dir
nokogiri -v '1.6.2.1' -- \ # pass options to nokogiri install
--with-xml2-include=/usr/local/Cellar/libxml2/2.7.8/include/libxml2 \
--with-xml2-lib=/usr/local/Cellar/libxml2/2.7.8/lib \
--with-xslt-dir=/usr/local/Cellar/libxslt/1.1.26 \
--with-iconv-include=/usr/local/Cellar/libiconv/1.13.1/include \
--with-iconv-lib=/usr/local/Cellar/libiconv/1.13.1/lib
This worked for me on Mavericks and Vagrant 1.6.1:
CC=/usr/bin/gcc vagrant plugin install vagrant-rackspace
I tried NOKOGIRI_USE_SYSTEM_LIBRARIES=1 but got an error saying that system libxml2 is too old.
Warning: This is a super-hacky solution, though it's hard to call it that.
Yesterday I installed Vagrant on another OSX Mavericks box. Like many other posts I read on SO "all I had to do" was run xcode-select --install and bingo vagrant plugin install vagrant-rackspace worked like a charm.
Today I was mired down in the Bundler code again when it dawned on me that since this is an isolated ruby environment why not nuke my ~/.vagrant.d directory and copy the same directory from the successful build on the other box...
The result? A working vagrant rackspace on my laptop! I'm not sure I'll ever figure out what was really wrong, but if anyone wants a shot at the 100 point bounty, I'm still open to suggestions!
In my case the nokogiri folders and their files located in ~/vagrant.d/gems/gems had wrong rights (user/group).
After changing them to username:staff (username being your console user name), it works like a charm.
Similarly with my case, I have an issue while installing vagrant-omnibus plugin for Vagrant 1.6.3 on OSX Mavericks 10.9.4 and ruby 2.0.0p247 rbenv.
I tried setting the env NOKOGIRI_USE_SYSTEM_LIBRARIES to 1 or true, then update+install but the same error still there.
I found that there is a suggestion in https://github.com/mitchellh/vagrant/issues/3769 to use the specify the baked in nokogiri version and this works for me. So, I also wrote a quick noted for myself to refer this unfortunates issue.
If Nate Murray's solution doesn't work, I found upgrading to a Vagrant version > 1.6.4 fixed the issue (as noted in this Github issue: https://github.com/mitchellh/vagrant/issues/3769)
in my case while trying to install vagrant-parallels, i had to check the Command line tools folder had an error in the naming for some reason. Fixing that allowed nokigiri to work well
I have installed 1.8.3 version but when I trying to install Ruby 1.9.2 via rvm see some ERRORS .
I used Google, used many methods to solve this problem but I have not received any any answers. Can anybody help me?
I quote the part of code(in Terminal) below
unforbiddenyet#Trash-PC:~$ rvm install 1.9.2
0Warning: Failed to create the file yaml-0.1.4.tar.gz: Access is denied
Database file /usr/share/ruby-rvm/config/packages does not exist.
0Warning: Failed to create the file ruby-1.9.2-p290.tar.bz2: Denied Warning: Access
curl: (23) Failed writing body (0 != 2503)
There was an error, please check /usr/share/ruby-rvm/log//*.log. Next we'll try to fetch via http.
0Warning: Failed to create the file ruby-1.9.2-p290.tar.bz2: Denied Warning: Access
Failed writing body (0 != 2804)
There was an error, please check /usr/share/ruby-rvm/log//*.log
There has been an error while trying to fetch the source.
Halting the installation.
There has been an error fetching the ruby interpreter. Halting the installation.
To create the packages, first install 1.8.7 and then to install the current version (currently 1.9.3):
$ rvm install 1.8.7
$ rvm install 1.9.3