Trouble getting Jekyll Themes served on local machine (could not find addressable...) - ruby

Been playing around with Jekyll for a few days now, but haven't been having any lucky trying to get themes working on my local machine.
I've tried several different themes and am getting errors that seem to be pointing towards missing files??? I'm not entirely sure as I'm completely new to Ruby.
What I've got installed
ruby 2.3.3p222 (2016-11-21 revision 56859) [x64-mingw32]
jekyll 3.4.3
What commands I'm running
~ $ cd ~/jekyll-theme/
~ $ jekyll serve
Error and Trace
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/spec_set.rb:87:in `block in materialize': Could not find addressable-2.4.0 in any of the sources (Bundler::GemNotFound)
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/spec_set.rb:80:in `map!'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/spec_set.rb:80:in `materialize'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/definition.rb:176:in `specs'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/definition.rb:235:in `specs_for'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/definition.rb:224:in `requested_specs'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:118:in `block in definition_method'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:19:in `setup'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler.rb:100:in `setup'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/jekyll-3.4.3/lib/jekyll/plugin_manager.rb:36:in `require_from_bundler'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/jekyll-3.4.3/exe/jekyll:9:in `<top (required)>'
from C:/Ruby23-x64/bin/jekyll:22:in `load'
from C:/Ruby23-x64/bin/jekyll:22:in `<main>'
Attemps
I've tried issuing the following command:
~ $ bundle exec jekyll serve
resulting in the same error and trace
Any insight is greatly appreciated.

you don't have addressable gem installed.
Run gem install jekyll once again to make sure all required dependencies get installed.
Or if you have a Gemfile, run bundle install

Related

compass fails on arch

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.

capistrano suddenly stopped working

i'm using a ubuntu vagrant box with installed capistrano to develop an application.
when i tried to deploy i get the following error:
/usr/lib/ruby/vendor_ruby/capistrano/configuration/loading.rb:152:in `require': no such file to load -- capistrano/ext/multistage (LoadError)
from /usr/lib/ruby/vendor_ruby/capistrano/configuration/loading.rb:152:in `require'
from ./config/deploy.rb:3:in `load'
from /usr/lib/ruby/vendor_ruby/capistrano/configuration/loading.rb:172:in `load_from_file'
from /usr/lib/ruby/vendor_ruby/capistrano/configuration/loading.rb:89:in `load'
from /usr/lib/ruby/vendor_ruby/capistrano/configuration/loading.rb:86:in `load'
from /usr/lib/ruby/vendor_ruby/capistrano/configuration/loading.rb:86:in `each'
from /usr/lib/ruby/vendor_ruby/capistrano/configuration/loading.rb:86:in `load'
from Capfile:4:in `load'
from /usr/lib/ruby/vendor_ruby/capistrano/configuration/loading.rb:172:in `load_from_file'
from /usr/lib/ruby/vendor_ruby/capistrano/configuration/loading.rb:89:in `load'
from /usr/lib/ruby/vendor_ruby/capistrano/configuration/loading.rb:86:in `load'
from /usr/lib/ruby/vendor_ruby/capistrano/configuration/loading.rb:86:in `each'
from /usr/lib/ruby/vendor_ruby/capistrano/configuration/loading.rb:86:in `load'
from /usr/lib/ruby/vendor_ruby/capistrano/cli/execute.rb:65:in `load_recipes'
from /usr/lib/ruby/vendor_ruby/capistrano/cli/execute.rb:65:in `each'
from /usr/lib/ruby/vendor_ruby/capistrano/cli/execute.rb:65:in `load_recipes'
from /usr/lib/ruby/vendor_ruby/capistrano/cli/execute.rb:31:in `execute!'
from /usr/lib/ruby/vendor_ruby/capistrano/cli/execute.rb:14:in `execute'
from /usr/bin/cap:4
as google suggested i tried to reinstall capistrano, but this failed because of dependencies(net-ssh requires ruby >= 2.0)
so i installed net-ssh v2.9.2
sudo gem install net-ssh -v 2.9.2
Fetching: net-ssh-2.9.2.gem (100%)
Successfully installed net-ssh-2.9.2
1 gem installed
but now the next dependency error occures...
How do i make a fresh installation of capistrano working?
do i need a newer version of ruby(apt-get install ruby tells me that the newest version is already installed)?
Or is the cause of this error something complete different?
I can't see anything in your trace about what version of ruby you're on, but you did say "net-ssh requires ruby >= 2.0", so you might need a newer version of ruby like you said. You can check the version of ruby you're using with ruby -v. I would also recommend using a version manager so that you can use multiple versions between projects. I find RVM or rbenv to be good starting points.
OK, this is strange...
after running vagrant provision multiple(~5) times and installing/deinstalling multiple gems and ruby versions the next "vagrant provision" fixed the problem magicaly. i still dont know why this error occured and what fixed it, bull i'll close this question...

Unable to run serverspec due to gem being unable to load

I'm trying to play around with serverspec, however it seems I have some weird gem error that I cannot pinpoint.
$ rake spec
/usr/bin/ruby -I/usr/lib/ruby/gems/1.8/gems/rspec-support-3.0.2/lib:/usr/lib/ruby/gems/1.8/gems/rspec-core-3.0.2/lib -S /usr/lib/ruby/gems/1.8/gems/rspec-core-3.0.2/exe/rspec spec/localhost/httpd_spec.rb
/home/mikolajewskim/puppet-master/spec/spec_helper.rb:1:in `require': no such file to load -- serverspec (LoadError)
from /home/mikolajewskim/puppet-master/spec/spec_helper.rb:1
from /home/mikolajewskim/puppet-master/spec/localhost/httpd_spec.rb:1:in `require'
from /home/mikolajewskim/puppet-master/spec/localhost/httpd_spec.rb:1
from /usr/lib/ruby/gems/1.8/gems/rspec-core-3.0.2/lib/rspec/core/configuration.rb:1057:in `load'
from /usr/lib/ruby/gems/1.8/gems/rspec-core-3.0.2/lib/rspec/core/configuration.rb:1057:in `load_spec_files'
from /usr/lib/ruby/gems/1.8/gems/rspec-core-3.0.2/lib/rspec/core/configuration.rb:1057:in `each'
from /usr/lib/ruby/gems/1.8/gems/rspec-core-3.0.2/lib/rspec/core/configuration.rb:1057:in `load_spec_files'
from /usr/lib/ruby/gems/1.8/gems/rspec-core-3.0.2/lib/rspec/core/runner.rb:97:in `setup'
from /usr/lib/ruby/gems/1.8/gems/rspec-core-3.0.2/lib/rspec/core/runner.rb:85:in `run'
from /usr/lib/ruby/gems/1.8/gems/rspec-core-3.0.2/lib/rspec/core/runner.rb:70:in `run'
from /usr/lib/ruby/gems/1.8/gems/rspec-core-3.0.2/lib/rspec/core/runner.rb:38:in `invoke'
from /usr/lib/ruby/gems/1.8/gems/rspec-core-3.0.2/exe/rspec:4
/usr/bin/ruby -I/usr/lib/ruby/gems/1.8/gems/rspec-support-3.0.2/lib:/usr/lib/ruby/gems/1.8/gems/rspec-core-3.0.2/lib -S /usr/lib/ruby/gems/1.8/gems/rspec-core-3.0.2/exe/rspec spec/localhost/httpd_spec.rb failed
Still, when I look at the list of gems, serverspec is there (1.9.0). I've also checked it's existance in gems directory. I'm running a system version of ruby 1.8.7 and I do not have multiple ruby installations.
I'm not really sure where to go from here. Thanks in advance for any help.
What helped was:
1) Upgrading ruby package on the system (still 1.8.7).
2) Upgrading rubygems.
3) Removing all gems.
4) Installing serverspec and rake again.

Rake aborted: could not find rspec

I'm trying to work through the Ruby course from TestFirst.org. It requires you to navigate to the folder containing the exercise, run rake, and then correct any errors in the source code it uncovers. When I run rake in the folder for the first exercise it gives this error:
rake aborted!
Could not find rspec (~> 2) amongst [diff-lcs-1.2.5, rspec-3.0.0, rspec-core-3.0.0,
rspec- expectations-3.0.0, rspec-mocks-3.0.1, rspec-support-3.0.0]
/home/jayson/Desktop/learn_ruby/Rakefile:2:in `<top (required)>'
(See full trace by running task with --trace)
Does this means it will only work with an old version of rspec or something else? Running rake with --trace gives me:
rake aborted!
Could not find rspec (~> 2) amongst [diff-lcs-1.2.5, rspec-3.0.0,
rspec-core-3.0.0, rspec-expectations-3.0.0, rspec-mocks-3.0.1, rspec-support-3.0.0]
/usr/lib/ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs'
/usr/lib/ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
/usr/lib/ruby/1.9.1/rubygems.rb:1231:in `gem'
/home/jayson/Desktop/learn_ruby/Rakefile:2:in `<top (required)>'
/usr/lib/ruby/vendor_ruby/rake/rake_module.rb:25:in `load'
/usr/lib/ruby/vendor_ruby/rake/rake_module.rb:25:in `load_rakefile'
/usr/lib/ruby/vendor_ruby/rake/application.rb:589:in `raw_load_rakefile'
/usr/lib/ruby/vendor_ruby/rake/application.rb:89:in `block in load_rakefile'
/usr/lib/ruby/vendor_ruby/rake/application.rb:160:in `standard_exception_handling'
/usr/lib/ruby/vendor_ruby/rake/application.rb:88:in `load_rakefile'
/usr/lib/ruby/vendor_ruby/rake/application.rb:72:in `block in run'
/usr/lib/ruby/vendor_ruby/rake/application.rb:160:in `standard_exception_handling'
/usr/lib/ruby/vendor_ruby/rake/application.rb:70:in `run'
/usr/bin/rake:27:in `<main>'
How do I get the rake command to work properly? I'm using Terminal in Ubuntu 14.04, with Ruby 1.9.3, RubyGems 1,8.23, and Rspec 3.0.0. Thanks in advance.
I had the same problem, and sudo gem install -v '<3.0.0' rspec did work, but only after I uninstalled the newer version with gem uninstall rspec.
Without that uninstall first, only the later version remains active and the problem will continue.
hope this help.
gem install rspec -v 2.9.0
It happen because:
Could not find rspec (~> 2)
while rspec version installed on your machine is: rspec-3.0.0
Source: RubyGems

nanoc installation setup in Linux

I'm a newbie to Ruby. Trying to setup nanoc in my machine. I'm running Ubuntu 14.04.
After the nanoc installation, when I type
$nanoc --version
I get the following errors:
/home/ananth/.rvm/gems/ruby-head#global/gems/bundler-1.6.2/lib/bundler/shared_helpers.rb:24:in `default_gemfile': Could not locate Gemfile (Bundler::GemfileNotFound)
from /home/ananth/.rvm/gems/ruby-head#global/gems/bundler-1.6.2/lib/bundler.rb:248:in `default_gemfile'
from /home/ananth/.rvm/gems/ruby-head#global/gems/bundler-1.6.2/lib/bundler.rb:192:in `root'
from /home/ananth/.rvm/gems/ruby-head#global/gems/bundler-1.6.2/lib/bundler.rb:99:in `bundle_path'
from /home/ananth/.rvm/gems/ruby-head#global/gems/bundler-1.6.2/lib/bundler.rb:400:in `configure_gem_home_and_path'
from /home/ananth/.rvm/gems/ruby-head#global/gems/bundler-1.6.2/lib/bundler.rb:90:in `configure'
from /home/ananth/.rvm/gems/ruby-head#global/gems/bundler-1.6.2/lib/bundler.rb:151:in `definition'
from /home/ananth/.rvm/gems/ruby-head#global/gems/bundler-1.6.2/lib/bundler.rb:116:in `setup'
from /home/ananth/.rvm/gems/ruby-head#global/gems/bundler-1.6.2/lib/bundler.rb:132:in `require'
from /home/ananth/.rvm/gems/ruby-head/gems/nanoc-3.7.0/bin/nanoc:7:in `<top (required)>'
from /home/ananth/.rvm/gems/ruby-head/bin/nanoc:23:in `load'
from /home/ananth/.rvm/gems/ruby-head/bin/nanoc:23:in `<main>'
from /home/ananth/.rvm/gems/ruby-head/bin/ruby_executable_hooks:15:in `eval'
from /home/ananth/.rvm/gems/ruby-head/bin/ruby_executable_hooks:15:in `<main>'
Am I missing something from my rvm? Anything to do with $PATH, .bashrc or .bash_profile?
Thanks for the help in advance!
This is a bug in 3.7.0 that will be fixed in 3.7.1.
3.7.0 unintentionally requires a Gemfile to be present when Bundler is installed.
To avoid this bug, either temporarily switch back to 3.6.11, or use a Gemfile (I recommend the latter).

Resources