No such file or directory -- extconf.rb (Loa dError) - Installing json (1.8.0) - extconf.rb

I should probably start by saying that I am new to rails. This specific error message came up as i was trying to run bundle install. Error pops up once installation gets to json.
=============================================================================
Installing json (1.8.0)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
D:/Dev/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
D:/Dev/RailsInstaller/Ruby1.9.3/bin/ruby.exe: No such file or directory -- extconf.rb (Loa
dError)
Gem files will remain installed in D:/Dev/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gem
s/json-1.8.0 for inspection.
Results logged to D:/Dev/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/json-1.8.0/ext/
json/ext/generator/gem_make.out
An error occurred while installing json (1.8.0), and Bundler cannot continue.
Make sure that gem install json -v '1.8.0' succeeds before bundling.
===============================================================================
gem_make.out log file is showing
===============================================================================
D:/Dev/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
D:/Dev/RailsInstaller/Ruby1.9.3/bin/ruby.exe: No such file or directory -- extconf.rb (LoadError)
===============================================================================
I already tried running gem install json and essentially got the same error message. DevKit is already installed. Reinstalling it made no difference.
Ruby version is 1.9.3p392
Rails version is 3.2.13
OS is Windows7 64bit
installation was completed using rubyinstaller.
Any help will be greatly appreciated.

I got the same error when trying to install Cucumber using the Gemfile provided in The Cucumber Book (p. 299) and also with gem install json.
When trying gem install cucumber it worked:
Fetching: multi_json-1.8.0.gem (100%)
Successfully installed multi_json-1.8.0
...
hth
Frank

Related

Rails rmagick error Ubuntu c9.io

I've been looking around on other rmagick threads for a good solution. Nothing has worked so far.
I'm working on a rails project on c9 IDE. I managed to successfully install imagemagick via the 'sudo apt get install imagemagick' command.
However when I try to run 'gem install rmagick' I get the following error
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
current directory: /usr/local/rvm/gems/ruby-2.3.0/gems/rmagick-2.15.4/ext/RMagick
/usr/local/rvm/rubies/ruby-2.3.0/bin/ruby -r ./siteconf20160608-3911-1hut05d.rb extconf.rb
checking for gcc... yes
checking for Magick-config... no
checking for pkg-config... yes
Package MagickCore was not found in the pkg-config search path.
Perhaps you should add the directory containing `MagickCore.pc' to the PKG_CONFIG_PATH environment variable
No package 'MagickCore' found checking for outdated ImageMagick version (<= 6.4.9)... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/rvm/rubies/ruby-2.3.0/bin/$(RUBY_BASE_NAME)
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/usr/local/rvm/gems/ruby-2.3.0/extensions/x86_64-linux/2.3.0/rmagick-2.15.4/mkmf.log extconf failed, exit code 1
Gem files will remain installed in /usr/local/rvm/gems/ruby 2.3.0/gems/rmagick-2.15.4 for inspection.
Results logged to /usr/local/rvm/gems/ruby-2.3.0/extensions/x86_64-linux/2.3.0/rmagick-2.15.4/gem_make.out
Try this (working for rmagick 3.0.0):
brew install imagemagick#6
brew link --force imagemagick#6
gem install rmagick

native client tutorial can't find libstdc++

I'm new to native client. I'm trying to follow the official tutorial on my newly installed ubuntu 14.
I'm getting the following when running "make serve" under the getting_started folder. I googled, it seems to be related to 32/64 bit. my system is 64bit, but pnacl seems to think it is 32.
Anyway I couldn't find a solution. do you know how?
/media/shi/work/nacl_sdk/pepper_34/toolchain/linux_pnacl/bin/pnacl-clang++ -o hello_tutorial.bc hello_tutorial.cc -O2 -I/media/shi/work/nacl_sdk/pepper_34/include -L/media/shi/work/nacl_sdk/pepper_34/lib/pnacl/Release -lppapi_cpp -lppapi
/media/shi/work/nacl_sdk/pepper_34/toolchain/linux_pnacl/host_x86_32/bin/clang: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
make[1]: * [hello_tutorial.bc] Error 127
make[1]: Leaving directory `/media/shi/work/nacl_sdk/pepper_34/getting_started/part1'
make: * [part1_ALL_TARGET] Error 2
It's probably easiest to install the i386 C/C++ libraries:
sudo apt-get install libc6:i386 libstdc++6:i386
There are 64-bit binaries included in the SDK as well (in toolchain/linux_pnacl/bin64/), but they are not run by default (and I'm not certain of an easy way to make the SDK use them).

Rubymotion ask for Xcode 4.x, but that version is already installed

I tried to ran rake in a rubymotion project and he shows the following error message
ERROR! Xcode 4.x or greater is required
But I have Xcode 4.3.2 installed on my Mac
What can I do?
PD: I installed Xcode 4.4.1 and now the error is this
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36: command not found: /Applications/Xcode 2.app/Contents/Developer/usr/bin/xcodebuild -version
Build ./build/iPhoneSimulator-5.1-Development
sh: /Applications/Xcode: No such file or directory
sh: /Applications/Xcode: No such file or directory
sh: /Applications/Xcode: No such file or directory
Compile ./app/app_delegate.rb
sh: /Applications/Xcode: No such file or directory
rake aborted!
Command failed with status (127): [/Applications/Xcode 2.app/Contents/Develop...]
Tasks: TOP => default => simulator => build:simulator
(See full trace by running task with --trace)
Perhaps you have an old version of Xcode also installed on your system. From the "Getting Started" page on RubyMotion's web site:
If you happened to have an older version of Xcode installed on your machine before you installed a newer Xcode from the App Store, you may want to type the following command in order to properly set up the default Xcode path.
$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

ImportError: No module named haystack

If I install the latest stable 1.2.7 django-haystack with sudo pip install django-haystack, it works fine. But after uninstalling it and installing the very latest dev version 2.0.0 BETA instead as suggested on the main page:
pip install -e git+https://github.com/toastdriven/django-haystack.git#master#egg=django-haystack
Despite the success messages below, it seems like it is not properly installed:
Obtaining django-haystack from git+https://github.com/toastdriven/django-haystack.git#master#egg=django-haystack
Cloning https://github.com/toastdriven/django-haystack.git (to master) to ./src/django-haystack
Running setup.py egg_info for package django-haystack
Installing collected packages: django-haystack
Running setup.py develop for django-haystack
Checking .pth file support in /usr/local/lib/python2.7/dist-packages/
/usr/bin/python -E -c pass
TEST PASSED: /usr/local/lib/python2.7/dist-packages/ appears to support .pth files
Creating /usr/local/lib/python2.7/dist-packages/django-haystack.egg-link (link to .)
Adding django-haystack 2.0.0-beta to easy-install.pth file
Installed /home/kave/projects/cb/src/django-haystack
Successfully installed django-haystack
Cleaning up...
because when I go into the django shell environment and do a
>>> from haystack import indexes
Traceback (most recent call last):
File "<console>", line 1, in <module>
ImportError: No module named haystack
I have followed the instructions and have
INSTALLED_APPS = (... 'haystack',) in there
I had this problem before, but could never solve it. sudo pip install default works fine, but as long as I get the latest Git version, my django doesn't seem to see it.
What could I be missing?
Many Thanks for your advice,
UPDATE
Apologies, but it seems the error is happening only within Aptana Studio 3.0. In Django Shell I can do the import after all. I am still dazzled, as this should be the same. Why can Aptana see the libraries when installing with sudo pip install django-haystack but not if using latest Git version? What could go wrong there please?
UPDATE 2
full sys.path
['/home/kaveh/projects/cb', '/usr/local/lib/python2.7/dist-packages/requests-0.13.9-py2.7.egg', '/home/kaveh/projects/cb/src/django-haystack', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PIL', '/usr/lib/python2.7/dist-packages/gst-0.10', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', '/usr/lib/python2.7/dist-packages/ubuntuone-client', '/usr/lib/python2.7/dist-packages/ubuntuone-control-panel', '/usr/lib/python2.7/dist-packages/ubuntuone-couch', '/usr/lib/python2.7/dist-packages/ubuntuone-installer', '/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol']
I finally got it working.
As I said the problem is pip install -e git+https://github.com/toastdriven/django-haystack.git#master#egg=django-haystack is apparently not working.
I simply uninstalled it and made sure its deleted.
Then I simply downloaded the source as zip file, extracted it and
python setup.py build
sudo python setup.py install
This way it will guaranteed be working. Hope this helps someone.

For Ruby on Rails, how to "gem install mysql2" after upgrading from Leopard to Snow Leopard?

It always says:
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
/Users/peter/.rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb
checking for rb_thread_blocking_region()... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
similar things happen if it is sqlite3:
ERROR: Error installing sqlite3:
ERROR: Failed to build gem native extension.
/Users/peter/.rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb
checking for sqlite3.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Update: at least sqlite3 is building now... that is after I rvm remove 1.9.2-p180 and removing all the 1.9.2, and reinstall by rvm install 1.9.2 and now sqlite3 can be bundle installed, but mysql2 still has problem.
I installed the 64 bit version of MySQL server and it will bundle install, and then this question helped with the
Library not loaded: libmysqlclient.18.dylib (LoadError)
solution: Library not loaded: libmysqlclient.16.dylib error when trying to run 'rails server' on OS X 10.6 with mysql2 gem

Resources