I am trying to run a simple example script from here, but even after installing requisite gems with no errors I get an error when running the script. It looks like libta_lib.so cant be found, but nothing in the install commands below had an error. Any idea what I am missing? Im happy to provide more data if needed, I just dont know what would be useful.
I ran:
#compiling ta-lib from source
gem uninstall talib_ruby
gem uninstall ta-indicator
make clean
sudo ./configure LDFLAGS="-lm"
sudo make
sudo make install
gem install talib_ruby
gem install ta-indicator
king#death-star ~/Desktop/_REPOS/misc/stock_analysis/forex/oanda/ruby $ ruby -e "require 'talib_ruby'; l = TaLib::Function.new('MA') "
/home/king/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': libta_lib.so.0: cannot open shared object file: No such file or directory - /home/king/.rvm/gems/ruby-2.3.0/gems/talib_ruby-1.0.6/lib/talib.so (LoadError)
from /home/king/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/king/.rvm/gems/ruby-2.3.0/gems/talib_ruby-1.0.6/lib/talib_ruby.rb:5:in `<top (required)>'
from /home/king/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `require'
from /home/king/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `rescue in require'
from /home/king/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in `require'
from -e:1:in `<main>'
As per this follow these steps
sudo gedit /etc/ld.so.conf
Append below line and save:
include /usr/local/lib
run sudo /sbin/ldconfig
Related
on a mac os 10.12.6 after i try sudo gem install rake or
i get this error message:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- rubygems/core_ext/kernel_warn (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Library/Ruby/Site/2.0.0/rubygems.rb:1395:in `<top (required)>'
from <internal:gem_prelude>:1:in `require'
from <internal:gem_prelude>:1:in `<compiled>'
The is error throws any gem install
Ruby version is 2.0.0, Ive tried updating ruby with homebrew but whni try installing home brew i get the same error.
Cant seem to edit /Library/Ruby/Site/2.0.0/rubygems.rb:1395
This is possibly related to issue #2535 in rubygems fixed in release 3.0.1.
Try gem update --system
All suggested solutions didn't fully work for me, although gem update --system seems to be a good idea, because it updates ruby. BUT: On my Mac, the system version didn't step back after the update, although ruby -v gave the correct new version. The described error remained for me, e.g. while using homebrew with brew update:
$ brew update
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- rubygems/core_ext/kernel_warn (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Library/Ruby/Site/2.3.0/rubygems.rb:1395:in `<top (required)>'
from <internal:gem_prelude>:4:in `require'
from <internal:gem_prelude>:4:in `<internal:gem_prelude>'
The only thing that helped me was the following as described here:
sudo rm -f '/usr/local/bin/update_rubygems'
sudo rm -rf '/Library/Ruby/Site/2.3.0'
Hope to help some folks (I'am on MacOS 10.14.2).
You are going to have problems using system ruby or messing with it's gems. You are far better off to use a ruby version manager where you may have different versions of ruby per project. I highly recommend RVM.
See here for how to install
Did you also try to run gem install bundler?
Post output of these commands if they don't give you an error
ruby -v
which ruby
gem env
Running grunt serve which use to work I'm having this error message.
Running "compass:server" (compass) task
Warning: Command failed: compass --version
/usr/lib/ruby/gems/2.4.0/gems/bundler-1.13.7/lib/bundler/definition.rb:179:in `rescue in specs': Your bundle is locked to chunky_png (1.3.4), but that version could not be found in any of the sources listed in your Gemfile. If you haven't changed sources, that means the author of chunky_png (1.3.4) has removed it. You'll need to update your bundle to a different version of chunky_png (1.3.4) that hasn't been removed in order to install. (Bundler::GemNotFound)
from /usr/lib/ruby/gems/2.4.0/gems/bundler-1.13.7/lib/bundler/definition.rb:173:in `specs'
from /usr/lib/ruby/gems/2.4.0/gems/bundler-1.13.7/lib/bundler/definition.rb:233:in `specs_for'
from /usr/lib/ruby/gems/2.4.0/gems/bundler-1.13.7/lib/bundler/definition.rb:222:in `requested_specs'
from /usr/lib/ruby/gems/2.4.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:118:in `block in definition_method'
from /usr/lib/ruby/gems/2.4.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:19:in `setup'
from /usr/lib/ruby/gems/2.4.0/gems/bundler-1.13.7/lib/bundler.rb:99:in `setup'
from /usr/lib/ruby/gems/2.4.0/gems/bundler-1.13.7/lib/bundler/setup.rb:20:in `<top (required)>'
from /usr/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:133:in `require'
from /usr/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:133:in `rescue in require'
from /usr/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:40:in `require'
from /usr/bin/compass:6:in `<main>'
So on side I ran a compass --version and I obtain the same error Your bundle is locked to chunky_png (1.3.4), etc.
Trying to bundle install seems a bit useless...
$ bundle install
Could not locate Gemfile or .bundle/ directory
So I tried to reinstall ruby-compass because which compass sent me to /usr/bin/compass which is the one set by ruby-compass AUR package.
that did'nt solved the problem. Any idea around ?
solved by installing compass via pacgem
details of commands :
to install pacgem
cd ~/devel/aur.archlinux.org/ # or where ever you used to put your AUR
git clone https://aur.archlinux.org/pacgem.git
cd pacgem
cat PKGBUILD # at this point, it is recommended to personally check to PKGBUILD
makepkg -si
and answer y to all questions
install compass
pacgem compass
and answer y to all questions. It will install needed dependencies.
I am running OS X 10.11.6 and I installed Jekyll (using the already existent ruby on my system) by the recommended method: sudo gem install -n /usr/local/bin/ jekyll.
I can happily run jekyll on my system so I made a new site by running jekyll new TestSite which successfully executed.
However, this is where it stops working: if I cd into the site directory and run any jekyll command I get the following error:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- bundler (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-3.2.1/lib/jekyll/plugin_manager.rb:34:in `require_from_bundler'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-3.2.1/exe/jekyll:9:in `<top (required)>'
from /usr/local/bin/jekyll:23:in `load'
from /usr/local/bin/jekyll:23:in `<main>'
Any ideas how to get it working?
It seems you don't have bundler gem. Try
gem install bundler
I want to update my ruby 2.0 into 2.1 so I did this:
rvm install ruby-2.1.0
Then I received this error:
ERROR: '/bin' is not writable - it is required for Homebrew, try 'brew doctor' to fix it!
Requirements installation failed with status: 1.
The whole output is this:
Searching for binary rubies, this might take some time.
Found remote file https://rvm_io.global.ssl.fastly.net/binaries/osx/10.10/x86_64/ruby-2.1.0.tar.bz2
Checking requirements for osx. /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- mach (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/Library/Homebrew/extend/pathname.rb:2:in `<top (required)>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/Library/Homebrew/global.rb:3:in `<top (required)>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/Library/brew.rb:15:in `<main>'
ERROR: '/bin' is not writable - it is required for Homebrew, try 'brew doctor' to fix it!
Requirements installation failed with status: 1.
I ran into the same issue when trying to install ruby-2.7.5. I found this blog post/article.
Essentially, in newer versions of OSX, the usr/local/bin and usr/local/share directories are protected from being written to. You will need perform these steps:
Run sudo chown -R `whoami`:admin /usr/local/bin
Enter your password (required when running "sudo" commands)
Run sudo chown -R `whoami`:admin /usr/local/share
Then run your install commands.
Hope this helps!
This was working fine and then suddenly it wasn't. I wish i knew why. Really stuck and cannot find anything online. I'm working on an ObjectiveC project. I've tried reseting everything with:
$ sudo gem uninstall ruby
$ sudo gem uninstall cocoapods
then
$ sudo gem install ruby
$ sudo gem install cocoapods
$ sudo gem update ruby
$ sudo gem update cocoapods
then i when in my projects directory i run
$pod install
and get the following error. I get this on all projects.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in `require': cannot load such file -- cocoapods-core (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in `rescue in require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:35:in `require'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods.rb:8:in `<module:Pod>'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods.rb:4:in `<top (required)>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/bin/pod:23:in `<top (required)>'
from /usr/bin/pod:23:in `load'
from /usr/bin/pod:23:in `<main>'
Any ideas/clues/answers would be very appreciated.
I reinstalled cocoa pods by running
$ sudo gem uninstall cocoapods-core cocoapods-downloader cocoapods
$ sudo gem install cocoapods
That resolved the issue for me
Looks like you're missing one of CocoaPod's dependencies. You should be able to install it with:
[sudo] gem install cocoapods-core
You should stop using "sudo" for tasks such as "gem install" etc. Here is a little tutorial on how to fix your ruby to ensure that you are not going to see issues with permissions for cocoapods (and other gems):
Can't get to work CocoaPods and Yosemite