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.
Related
What must I do when I want to copy an installed gem from one installation to another one without using the gem command?
I have to install SQLite3 on a server without an internet connection. Normally I can do it with a copy of the gem-file:
gem install --local sqlite3-1.4.0.gem --platform ruby
But for SQLite3 it needs a connection to the internet to get libraries to compile some binaries. The installation worked well on a computer with an internet connection.
So my idea was to take my successful installation on the same OS and same Ruby version and copy all the related components, but this did not work.
When I called:
require 'sequel'
db = Sequel.sqlite
I got this error:
LoadError: The specified module could not be found
d:/bin/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sqlite3-1.4.1/lib/sqlite3/sqlite3_native.so
(Sequel::AdapterNotFound)
In the trace is:
d:/bin/Ruby26-x64/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': LoadError: 126: The specified module could not be found. - d:/bin/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sqlite3-1.4.1/lib/sqlite3/sqlite3_native.so (Sequel::AdapterNotFound)
from d:/bin/Ruby26-x64/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from d:/bin/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sqlite3-1.4.1/lib/sqlite3.rb:6:in `rescue in <top (required)>'
from d:/bin/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sqlite3-1.4.1/lib/sqlite3.rb:2:in `<top (required)>'
from d:/bin/Ruby26-x64/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `require'
from d:/bin/Ruby26-x64/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `rescue in require'
from d:/bin/Ruby26-x64/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:34:in `require'
from d:/bin/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sequel-5.17.0/lib/sequel/adapters/sqlite.rb:3:in `<top (required)>'
from d:/bin/Ruby26-x64/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from d:/bin/Ruby26-x64/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from d:/bin/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sequel-5.17.0/lib/sequel/database/connecting.rb:88:in `load_adapter'
from d:/bin/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sequel-5.17.0/lib/sequel/database/connecting.rb:17:in `adapter_class'
from d:/bin/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sequel-5.17.0/lib/sequel/database/connecting.rb:45:in `connect'
from d:/bin/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sequel-5.17.0/lib/sequel/core.rb:121:in `connect'
from d:/bin/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sequel-5.17.0/lib/sequel/core.rb:399:in `adapter_method'
from d:/bin/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sequel-5.17.0/lib/sequel/core.rb:406:in `block (2 levels) in def_adapter_method'
from _ruby_version.rb:21:in `<main>'
but the file exists:
What is my error?
I'm using Windows Server 2016.
I found a precompiled version of SQLite3 in a GitHub issue which works for me, but I would like to use a newer version.
Use Bundler for this.
In short:
Run gem install bundler on each machine you're using.
Maintain a project Gemfile listing all requirements
Run bundle install when your Gemfile changes and bundle update to update to latest versions. This will generate the Gemfile.lock file.
Prefix ruby execution with bundle exec, e.g. bundle exec ruby myscript or bundle exec rails c
That's a brief summary, but please read up more on Bundler. It's an essential part of modern Ruby deployment.
You need to use the package option of bundler.
First you need to cache your dependencies into vendor/cache with:
bundle package --all --all-platforms
This will install all the dependencies of your Gemfile locally, then add the directory to your source code repository.
When deploying make sure you use bundle install --local to use the local version.
See the documentation for bundle package for more information.
I get the following error when trying to do anything with Ruby, specifically ruby gems:
/usr/local/rvm/rubies/ruby-2.4.5/lib/ruby/2.4.0/yaml.rb:5:in `<top (required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
/usr/local/rvm/rubies/ruby-2.4.5/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:130:in `require': incompatible library version - /usr/local/rvm/gems/ruby-2.4.5/gems/psych-3.1.0/lib/psych.so (LoadError)
from /usr/local/rvm/rubies/ruby-2.4.5/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:130:in `rescue in require'
from /usr/local/rvm/rubies/ruby-2.4.5/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:34:in `require'
from /usr/local/rvm/gems/ruby-2.4.5/gems/psych-3.1.0/lib/psych.rb:16:in `rescue in <top (required)>'
from /usr/local/rvm/gems/ruby-2.4.5/gems/psych-3.1.0/lib/psych.rb:13:in `<top (required)>'
from /usr/local/rvm/rubies/ruby-2.4.5/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/rvm/rubies/ruby-2.4.5/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/rvm/rubies/ruby-2.4.5/lib/ruby/2.4.0/yaml.rb:6:in `<top (required)>'
from /usr/local/rvm/rubies/ruby-2.4.5/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/rvm/rubies/ruby-2.4.5/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/rvm/rubies/ruby-2.4.5/lib/ruby/site_ruby/2.4.0/rubygems.rb:729:in `load_yaml'
from /usr/local/rvm/rubies/ruby-2.4.5/lib/ruby/site_ruby/2.4.0/rubygems/config_file.rb:349:in `load_file'
from /usr/local/rvm/rubies/ruby-2.4.5/lib/ruby/site_ruby/2.4.0/rubygems/config_file.rb:202:in `initialize'
from /usr/local/rvm/rubies/ruby-2.4.5/lib/ruby/site_ruby/2.4.0/rubygems/gem_runner.rb:79:in `new'
from /usr/local/rvm/rubies/ruby-2.4.5/lib/ruby/site_ruby/2.4.0/rubygems/gem_runner.rb:79:in `do_configuration'
from /usr/local/rvm/rubies/ruby-2.4.5/lib/ruby/site_ruby/2.4.0/rubygems/gem_runner.rb:44:in `run'
from /usr/local/rvm/rubies/ruby-2.4.5/bin/gem:21:in `<main>'
I believe the line of note is this one:
LoadError: incompatible library version - /usr/local/rvm/gems/ruby-2.4.5/gems/psych-3.1.0/lib/psych.so
I get this from gem install puppet, gem update, etc. I tried uninstalling and reinstalling libyaml, and same with Ruby. The error happened after I did bundle uninstall puppet to get it to stop pointing to the 6.3.0 gem and point to the 4.10.2 executable. I need Ruby to be able to use Rspec to test the modules. Does anyone know how I can fix this?
Without steps to reproduce the broken system it is hard to say what happened, but I can say in general how you can set this up correctly to use a specific version of Puppet.
Does this help? In the worst case, you can probably uninstall RVM and reinstall it.
Before I continue, let me note that Puppet 4.10.2 and 4.10.3 have both been removed from Rubygems. (Although I was able to install it with PDK.)
For the remainder I assume 4.10.4 instead (just to distinguish it from latest 4.10).
The recommended approach is to use Puppet Development Kit (pdk). If you download and install PDK, you probably just need to do these steps:
pdk convert
rm Gemfile.lock
PUPPET_GEM_VERSION=4.10.4 bundle update # If that version isn't already in PDK.
pdk test unit --puppet-version 4.10.4
If you don't want to go down the PDK path, you can try these alternatives:
Hardcode the version of Puppet you want in Gemfile.
gem 'puppet', '4.10.4'
Or:
gem 'puppet', '~> 4.10' # latest 4.10
Then update your bundle:
rm -f Gemfile.lock
bundle update
Or, you can implement the PUPPET_GEM_VERSION feature by adding this code (this is what I do, for what it's worth):
if puppetversion = ENV['PUPPET_GEM_VERSION']
gem 'puppet', puppetversion
else
gem 'puppet'
end
And then:
rm -f Gemfile.lock
PUPPET_GEM_VERSION='~> 4.10' bundle update
Now you can run your unit tests against a specific version of Puppet per normal:
bundle exec rake spec
Or however you set it up.
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
I'm pretty new to using grunt, compass, and sass and am having trouble getting it to work. I have a Redhat installation with Drupal 7 and when I try to run 'grunt compass' from within the site's theme directory I get the following error:
Running "compass:dist" (compass) task
Warning: 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.
I've installed Grunt, Bower, and used 'bundle install' to install the needed gems. When I run 'gem list' I get the following:
bigdecimal (1.2.4)
breakpoint (2.0.7)
bundler (1.6.2)
bundler-unload (1.0.2)
chunky_png (1.3.1)
compass (0.12.6)
compass-normalize (1.4.3)
executable-hooks (1.3.1)
fssm (0.2.10)
gem-wrappers (1.2.4)
io-console (0.4.2)
json (1.8.1)
kss (0.5.0)
minitest (4.7.5)
psych (2.0.3)
rake (10.1.0)
rdoc (4.1.0)
ruby (0.1.0)
rubygems-bundler (1.4.3)
rubygems-update (2.2.2)
rvm (1.11.3.9)
sass (3.2.19)
test-unit (2.1.1.0)
zurb-foundation (4.3.2)
So it seems that I have all of the needed gems. I then looked at my PATH settings via 'echo $PATH' and got the following:
/home/ec2-user/.rvm/gems/ruby-2.1.1/bin:/home/ec2-user/.rvm/gems/ruby-2.1.1#global/bin:/home/ec2-user/.rvm/rubies/ruby-2.1.1/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/aws/bin:/home/ec2-user/bin:/home/ec2-user/.rvm/bin
I looked into the paths and see that in /usr/bin I have ruby2.0 and in /home/ec2-user/bin I have compass so the installations seem to be in the system PATH.
When I run 'ruby2.0' from the command line I get the following:
/usr/local/share/ruby/site_ruby/2.0/rubygems/ext/builder.rb:12:in `<class:Builder>': uninitialized constant Gem::UserInteraction (NameError)
from /usr/local/share/ruby/site_ruby/2.0/rubygems/ext/builder.rb:10:in `<top (required)>'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/ext.rb:13:in `<top (required)>'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/specification.rb:1431:in `build_extensions'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/stub_specification.rb:60:in `build_extensions'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/basic_specification.rb:56:in `contains_requirable_file?'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/specification.rb:925:in `block in find_inactive_by_path'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/specification.rb:924:in `each'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/specification.rb:924:in `find'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/specification.rb:924:in `find_inactive_by_path'
from /usr/local/share/ruby/site_ruby/2.0/rubygems.rb:185:in `try_activate'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/core_ext/kernel_require.rb:132:in `rescue in require'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/core_ext/kernel_require.rb:144:in `require'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/user_interaction.rb:8:in `<top (required)>'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/config_file.rb:7:in `<top (required)>'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/specification.rb:1430:in `build_extensions'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/stub_specification.rb:60:in `build_extensions'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/basic_specification.rb:56:in `contains_requirable_file?'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/specification.rb:925:in `block in find_inactive_by_path'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/specification.rb:924:in `each'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/specification.rb:924:in `find'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/specification.rb:924:in `find_inactive_by_path'
from /usr/local/share/ruby/site_ruby/2.0/rubygems.rb:185:in `try_activate'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/core_ext/kernel_require.rb:132:in `rescue in require'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/core_ext/kernel_require.rb:144:in `require'
from <internal:abrt_prelude>:2:in `<compiled>'
When I run simply 'ruby' nothing ever happens. Is 'grunt compass' looking to find 'ruby' and instead I have 'ruby2.0'? Do I need to create a symlink with ruby -> ruby2.0?
When I run 'compass' from the command line I get:
Usage: compass help [command]
Description:
The Compass Stylesheet Authoring Framework helps you
build and maintain your stylesheets and makes it easy
for you to use stylesheet libraries provided by others.
Etc.
Any thoughts would be appreciated
I've done some researching on this and the following worked for me...
If you have a windows build with Ruby and Compass installed via CLI then try;
Control Panel > System > Advanced system settings
Advanced > Environment Variables
Under System variables search for the 'path' variable which should have a value
Finally click edit and add ;C:\Ruby193\bin at the very end of the Variable value.
This should do the trick.
Note that ;C:\Ruby193\bin refers to the installation of Ruby > Compass on your machine.
If you have a Mac build then perhaps a similar version of fix could work for Mac but I couldn't map that for you, a bit of Googling might help...
grunt compass looks for a ruby gem. In your case 'compass -v' gives no error so the compass part works fine. outside this, it doesn't depend on any other component of ruby.
Now that compass is ready, grunt compass also looks for a npm module grunt-contrib-compass which you would find reference of in a package.json file. If you do a npm install this npm package gets installed and I believe it should make grunt compass work.
grunt-contrib-compass has a bundleExec option that makes the magic. With bundle it will load the gems installed using bundle install. Just set bundleExec: true
https://github.com/gruntjs/grunt-contrib-compass#bundleexec
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