I'm trying to generate a blog with octopress. When I do rake deploy I get this error:
Could not find posix-spawn-0.3.6 in any of the sources
Run `bundle install` to install missing gems.
bundle install:
Using rake (0.9.2.2)
Using RedCloth (4.2.9)
Using posix-spawn (0.3.6)
Using albino (1.3.3)
Using blankslate (2.1.2.4)
Using chunky_png (1.2.6)
Using fast-stemmer (1.0.1)
Using classifier (1.3.3)
Using fssm (0.2.9)
Using sass (3.2.1)
Using compass (0.12.2)
Using directory_watcher (1.4.1)
Using ffi (1.0.11)
Using haml (3.1.7)
Using kramdown (0.13.8)
Using liquid (2.3.0)
Using syntax (1.0.0)
Using maruku (0.6.0)
Using jekyll (0.11.2)
Using rubypython (0.5.3)
Using pygments.rb (0.2.13)
Using rack (1.4.1)
Using rack-protection (1.2.0)
Using rb-fsevent (0.9.1)
Using rdiscount (1.6.8)
Using rubypants (0.2.0)
Using tilt (1.3.3)
Using sinatra (1.3.3)
Using stringex (1.4.0)
Using bundler (1.1.5)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is
installed.
I have the right version of posix-spawn installed, so I'm not sure how to fix this error. I even recompiled it with my package manager, and still get the same error.
-- Gemfile
source "http://rubygems.org"
group :development do
gem 'rake', '~> 0.9.2'
gem 'rack', '~> 1.4.1'
gem 'jekyll', '~> 0.11.2'
gem 'rdiscount', '~> 1.6.8'
gem 'pygments.rb', '~> 0.2.12'
gem 'RedCloth', '~> 4.2.9'
gem 'haml', '~> 3.1.6'
gem 'compass', '~> 0.12.1'
gem 'rubypants', '~> 0.2.0'
gem 'rb-fsevent', '~> 0.9'
gem 'stringex', '~> 1.4.0'
gem 'liquid', '~> 2.3.0'
end
gem 'sinatra', '~> 1.3.2'
Related
I have a puppet module project that fails when trying to update Gems, although it works in some computers. The Gems are used for the spec tests of the module.
Here's the command I run and the output:
X:\puppet-module-rems>gem install -g Gemfile -f
ERROR: While executing gem ... (Gem::UnsatisfiableDependencyError)
Unable to resolve dependency: user requested 'win32-service (= 0.8.7)'
The gem that it's trying to install/update is already in the system:
X:\puppet-module-rems>gem list -l
*** LOCAL GEMS ***
ast (2.3.0)
bigdecimal (1.2.4)
builder (3.2.2)
bundler (1.13.0.rc.2)
childprocess (0.5.9)
ci_reporter (2.0.0)
ci_reporter_rspec (1.0.0)
deep_merge (1.0.1)
diff-lcs (1.2.5)
facter (2.4.6 x64-mingw32)
ffi (1.9.14 x64-mingw32, 1.9.6 x64-mingw32)
ffi-win32-extensions (1.0.3)
hiera (1.3.4)
hiera-eyaml (2.1.0)
highline (1.6.21)
io-console (0.4.3, 0.4.2)
json (1.8.1)
json_pure (2.0.2)
metaclass (0.0.4)
minitar (0.5.4)
minitest (4.7.5)
mocha (1.1.0)
multi_json (1.12.1)
multi_test (0.1.2)
parser (2.3.1.2)
powerpack (0.1.1)
psych (2.0.5)
ptools (1.3.3 universal-mingw32)
puppet (3.8.1 x64-mingw32)
puppet-lint (2.0.2)
puppet-syntax (2.1.0)
puppetlabs_spec_helper (1.1.1)
rainbow (2.1.0)
rake (10.1.0)
rdoc (4.1.0)
rspec (3.5.0, 3.5.0.beta2)
rspec-core (3.5.2, 3.5.0.beta2)
rspec-expectations (3.5.0, 3.5.0.beta2)
rspec-mocks (3.5.0, 3.5.0.beta2)
rspec-puppet (2.4.0, 2.3.2)
rspec-support (3.5.0, 3.5.0.beta2)
rubocop (0.42.0)
ruby-progressbar (1.8.1)
stomp (1.3.3)
sys-admin (1.6.4)
test-unit (2.5.5, 2.1.7.0, 2.1.6.0, 2.1.5.0)
thread_order (1.1.0)
trollop (2.1.2)
unicode-display_width (1.1.0)
win32-dir (0.4.9)
win32-eventlog (0.6.6, 0.6.2)
win32-file (0.8.1)
win32-file-stat (1.5.5)
win32-process (0.7.5, 0.7.4)
win32-security (0.2.5)
win32-service (0.8.7, 0.8.6)
Here's the version of ruby I have:
X:\puppet-module-rems>ruby --version
ruby 2.1.7p400 (2015-08-18 revision 51632) [x64-mingw32]
EDITED #1
Here's the content of the Gemfile:
source 'https://rubygems.org'
puppetversion = ENV.key?('PUPPET_VERSION') ? "= #{ENV['PUPPET_VERSION']}" : ['3.8.1']
gem 'puppet', puppetversion
gem 'puppetlabs_spec_helper', '= 1.1.1'
gem 'puppet-lint', '>= 0.3.2'
gem 'facter', '>= 1.7.0'
gem 'ci_reporter_rspec'
gem 'win32-service', '= 0.8.7'
gem 'rake', '= 10.1.0'
gem 'rspec-core', '= 3.5.2'
gem 'rspec-expectations', '= 3.5.0'
gem 'rspec-mocks', '= 3.5.0'
gem 'rspec-puppet', '= 2.4.0'
gem 'rspec-support', '= 3.5.0'
So, after further research, I found that the problem was not related to my code, files or configuration but with a problem with Rubygems.
Bottomline, I had to follow this link and manually update the certificate.
It looks like ruby wasn't able to connect to the server to check for dependencies of the gems I was requiring.
My blog is based on Jekyll Bootstrap, and I've recently set up a new machine with Windows 10.
When I start my server on my local machine for testing, it says that I should add something to my Gemfile:
$ jekyll serve -w
Configuration file: C:/Users/mark/Documents/ploeh/Blog/_config.yml
Source: C:/Users/mark/Documents/ploeh/Blog
Destination: C:/Users/mark/Documents/ploeh/Blog/_site
Generating...
done.
Please add the following to your Gemfile to avoid polling for changes:
gem 'wdm', '>= 0.1.0' if Gem.win_platform?
Auto-regeneration: enabled for 'C:/Users/mark/Documents/ploeh/Blog'
Configuration file: C:/Users/mark/Documents/ploeh/Blog/_config.yml
Server address: http://127.0.0.1:4000/
Server running... press ctrl-c to stop.
As you can see, it tells me to add a line to my Gemfile. Unfortunately, I've already tried doing that, but it seems to make no difference:
$ cat Gemfile
gem 'wdm', '>= 0.1.0' if Gem.win_platform?
source 'https://rubygems.org'
As you can see, the line in question is already in my Gemfile.
Moving things around in the Gemfile doesn't make any difference:
source 'https://rubygems.org'
gem 'wdm', '>= 0.1.0' if Gem.win_platform?
Why is it saying this, and should I care? If I should care, then how can I resolve the issue?
In case it matters, here's my Ruby version:
$ ruby --version
ruby 2.2.2p95 (2015-04-13 revision 50295) [x64-mingw32]
Other version information:
$ gem list
*** LOCAL GEMS ***
bigdecimal (1.2.6)
blankslate (2.1.2.4)
celluloid (0.16.0)
classifier-reborn (2.0.3)
coffee-script (2.4.1)
coffee-script-source (1.9.1.1)
colorator (0.1)
execjs (2.6.0)
fast-stemmer (1.0.2)
ffi (1.9.10 x64-mingw32)
hitimes (1.2.2)
io-console (0.4.3)
jekyll (2.5.3)
jekyll-coffeescript (1.0.1)
jekyll-gist (1.3.4)
jekyll-paginate (1.1.0)
jekyll-sass-converter (1.3.0)
jekyll-watch (1.2.1)
json (1.8.1)
kramdown (1.8.0)
liquid (2.6.3)
listen (2.10.1)
mercenary (0.3.5)
minitest (5.4.3)
parslet (1.5.0)
posix-spawn (0.3.11)
power_assert (0.2.2)
psych (2.0.8)
pygments.rb (0.6.3)
rake (10.4.2)
rb-fsevent (0.9.6)
rb-inotify (0.9.5)
rdoc (4.2.0)
redcarpet (3.3.2)
safe_yaml (1.0.4)
sass (3.4.18)
test-unit (3.0.8)
timers (4.0.4)
toml (0.1.2)
yajl-ruby (1.2.1)
Type gem install wdm in console and see if this resolves the issue.
I have an Octopress blog running on Heroku using a buildpack (https://github.com/jgarber/heroku-buildpack-ruby-octopress). It was working fine up until a few days ago, when I started getting the error below on deployment (everything works fine on local). I reverted to a working git and tried to deploy again but no dice.
env: bundle: no such file or directory error.
Here is the deployment log
-----> Deleting 0 files matching .slugignore patterns.
-----> Fetching custom git buildpack... done
-----> Octopress app detected
-----> Using Ruby version: ruby-2.0.0
-----> Installing dependencies using Bundler version 1.3.2
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
Fetching gem metadata from http://rubygems.org/.......
Fetching gem metadata from http://rubygems.org/..
Installing rake (10.1.1)
Installing RedCloth (4.2.9)
Installing chunky_png (1.2.9)
Installing fast-stemmer (1.0.2)
Installing classifier (1.3.4)
Installing fssm (0.2.10)
Installing sass (3.2.13)
Installing compass (0.12.2)
Installing directory_watcher (1.5.1)
Installing haml (3.1.8)
Installing kramdown (0.14.2)
Installing liquid (2.3.0)
Installing maruku (0.7.0)
Installing posix-spawn (0.3.8)
Installing yajl-ruby (1.1.0)
Installing pygments.rb (0.3.7)
Installing jekyll (0.12.1)
Installing rack (1.5.2)
Installing rack-protection (1.5.1)
Installing rdiscount (1.6.8)
Installing rubypants (0.2.0)
Installing sass-globbing (1.0.0)
Installing tilt (1.4.1)
Installing sinatra (1.4.4)
Installing stringex (1.4.0)
Using bundler (1.3.2)
Your bundle is complete! It was installed into ./vendor/bundle
Cleaning up the bundler cache.
Removing bundler (1.3.0.pre.5)
-----> Building Octopress site
env: bundle: No such file or directory
-----> Discovering process types
Procfile declares types -> (none)
Gemfile
source "http://rubygems.org"
gem 'rake'
gem 'jekyll', '~> 0.12'
gem 'rdiscount', '~> 1.6.8'
gem 'pygments.rb', '~> 0.3.4'
gem 'RedCloth', '~> 4.2.9'
gem 'haml', '~> 3.1.7'
gem 'compass', '~> 0.12.2'
gem 'sass-globbing', '~> 1.0.0'
gem 'rubypants', '~> 0.2.0'
gem 'stringex', '~> 1.4.0'
gem 'liquid', '~> 2.3.0'
gem 'sinatra', '~> 1.4.2'
group :development do
gem 'rb-fsevent', '~> 0.9'
end
Gemfile.lock
GEM
remote: http://rubygems.org/
specs:
RedCloth (4.2.9)
chunky_png (1.2.9)
classifier (1.3.3)
fast-stemmer (>= 1.0.0)
compass (0.12.2)
chunky_png (~> 1.2)
fssm (>= 0.2.7)
sass (~> 3.1)
directory_watcher (1.5.1)
fast-stemmer (1.0.2)
fssm (0.2.10)
haml (3.1.8)
jekyll (0.12.1)
classifier (~> 1.3)
directory_watcher (~> 1.1)
kramdown (~> 0.14)
liquid (~> 2.3)
maruku (~> 0.5)
pygments.rb (~> 0.3.2)
kramdown (0.14.2)
liquid (2.3.0)
maruku (0.7.0)
posix-spawn (0.3.8)
pygments.rb (0.3.7)
posix-spawn (~> 0.3.6)
yajl-ruby (~> 1.1.0)
rack (1.5.2)
rack-protection (1.5.1)
rack
rake (10.1.1)
rb-fsevent (0.9.3)
rdiscount (1.6.8)
rubypants (0.2.0)
sass (3.2.13)
sass-globbing (1.0.0)
sass (>= 3.1)
sinatra (1.4.4)
rack (~> 1.4)
rack-protection (~> 1.4)
tilt (~> 1.3, >= 1.3.4)
stringex (1.4.0)
tilt (1.4.1)
yajl-ruby (1.1.0)
PLATFORMS
ruby
DEPENDENCIES
RedCloth (~> 4.2.9)
compass (~> 0.12.2)
haml (~> 3.1.7)
jekyll (~> 0.12)
liquid (~> 2.3.0)
pygments.rb (~> 0.3.4)
rake
rb-fsevent (~> 0.9)
rdiscount (~> 1.6.8)
rubypants (~> 0.2.0)
sass-globbing (~> 1.0.0)
sinatra (~> 1.4.2)
stringex (~> 1.4.0)
I have searched up and down but nothing seems to work for me. Any help would be much appreciated.
I removed and add the BUILDPACK_URL again.
heroku config:remove BUILDPACK_URL
heroku config:set BUILDPACK_URL=https://github.com/nicholasmott/heroku-buildpack-octopress.git
And created a Procfile with content:
web: bundle exec rackup config.ru -p $PORT
I don't know which resolves the problem, but now it works.
I tried
Simply set the url again: Nothing.
Freeze the ruby version: Nothing.
Create a Profile without bundle: Nothing.
Then I removed the Buildpack and I got my site down. I added again the buildpack and I created a Procfile and after that it just runs :)
Try creating another application and Git remote using an updated version of the buildpack. It takes into account the way Heroku wants you to specify Ruby version in the Gemfile, which is new since Jason wrote his original buildpack.
I had a similar thing happen to me on my jekyll site when I updated my gems.
I had to roll back my heroku to the "stock" heroku buildpack. Then everything started to work again.
I do have a problem with bundler install for the gem 'factory_girl_rails' and I don't know how to resolve.
Each time I run bundle install in the application/project directory the following error is thrown:
(it doesn't matter if I create a new rails app and add factory_girl to the gemfile either)
Gem::InstallError: factory_girl requires Ruby version >= 1.9.2.
An error occured while installing factory_girl (4.1.0), and Bundler cannot continue.
Make sure that gem install factory_girl -v '4.1.0' succeeds before bundling.
When I type 'gem intall factory_girl_rails' in the terminal it successfully installs.
My configuration:
osx mountain lion
ruby 1.9.3p286
gem 1.8.24
rails 3.2.8
which ruby:
/usr/local/bin/ruby
which gem:
/usr/local/bin/gem
which rails:
/usr/local/bin/rails
gem list:
*** LOCAL GEMS ***
actionmailer (3.2.8)
actionpack (3.2.8)
activemodel (3.2.8)
activerecord (3.2.8)
activeresource (3.2.8)
activesupport (3.2.8)
addressable (2.3.2)
arel (3.0.2)
bcrypt-ruby (3.0.1)
best_in_place (1.1.2)
bigdecimal (1.1.0)
builder (3.1.4, 3.0.4)
bundler (1.2.1)
cancan (1.6.8)
capybara (1.1.2)
carrierwave (0.7.0)
childprocess (0.3.6)
client_side_validations (3.2.1)
coffee-rails (3.2.2)
coffee-script (2.2.0)
coffee-script-source (1.4.0, 1.3.3)
country_select (1.0.1)
devise (2.1.2)
diff-lcs (1.1.3)
erubis (2.7.0)
evernote (1.2.1)
evernote-thrift (1.22.1)
execjs (1.4.0)
factory_girl (4.1.0)
factory_girl_rails (4.1.0)
faraday (0.8.4)
ffi (1.1.5)
geocoder (1.1.4)
guard (1.4.0)
guard-rspec (2.1.0)
hashie (1.2.0)
hike (1.2.1)
httpauth (0.2.0)
i18n (0.6.1)
io-console (0.3)
journey (1.0.4)
jquery-rails (2.1.3)
json (1.7.5)
jwt (0.1.5)
libwebsocket (0.1.5)
listen (0.5.3)
mail (2.4.4)
metaclass (0.0.1)
mime-types (1.19)
minitest (4.1.0)
mocha (0.12.7)
multi_json (1.3.7, 1.3.6)
multipart-post (1.1.5)
nested_form (0.2.3)
nifty-generators (0.4.6)
nokogiri (1.5.5)
oauth (0.4.7)
oauth2 (0.8.0)
omniauth (1.1.1)
omniauth-dropbox (0.2.0)
omniauth-evernote (1.2.0)
omniauth-facebook (1.4.1)
omniauth-foursquare (0.0.8)
omniauth-google (1.0.2)
omniauth-google-oauth2 (0.1.13)
omniauth-instagram (1.0.0)
omniauth-linkedin (0.0.8)
omniauth-oauth (1.0.1)
omniauth-oauth2 (1.1.1)
omniauth-salesforce (1.0.3)
omniauth-twitter (0.0.13)
omniauth-windowslive (0.0.8.1)
omniauth-xing (0.1.3)
omniauth-yahoo (0.0.4)
orm_adapter (0.4.0)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2)
rack-protection (1.2.0)
rack-ssl (1.3.2)
rack-test (0.6.2)
rails (3.2.8)
railties (3.2.8)
rake (0.9.2.2)
rdoc (3.12)
redis (3.0.2)
rmagick (2.13.1)
rspec (2.11.0)
rspec-core (2.11.1)
rspec-expectations (2.11.3)
rspec-mocks (2.11.3)
rspec-rails (2.11.4)
rubygems-update (1.8.24)
rubyzip (0.9.9)
sass (3.2.2, 3.2.1)
sass-rails (3.2.5)
selenium-webdriver (2.25.0)
simple_form (2.0.4)
sinatra (1.3.3)
sprockets (2.8.0, 2.1.3)
sqlite3 (1.3.6)
thor (0.16.0)
thrift (0.9.0)
thrift_client (0.8.2)
tilt (1.3.3)
treetop (1.4.12, 1.4.11)
tzinfo (0.3.35, 0.3.34, 0.3.33)
uglifier (1.3.0)
warden (1.2.1)
xpath (0.1.4)
Content of the Gemfile:
source 'https://rubygems.org'
gem 'rails', '3.2.8'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
group :test, :development do
gem 'aruba'
gem 'cucumber'
gem 'rspec-rails'
gem 'mongoid-rspec'
gem 'capybara'
gem 'database_cleaner'
gem 'jasmine'
gem 'factory_girl_rails'
end
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'debugger'
gem 'devise'
gem 'mongoid'
gem 'mongoid_spacial'
gem 'haml'
gem 'bson_ext'
gem 'rails-backbone'
Remove the Gemfile.lock file, and run bundle install again. Or run bundle update. Ref: Bundle says gem is missing - but it's not?
Cracked it!
I have to "update" bundler.
I issued the following command: gem install bundler
The following messages is shown: Successfully installed bundler-1.2.1
After that I restarted terminal and again issued the "bundle install" command in the application/projects directory.
Now factory_girl and factory_girl_rails installed successfully! :-)
Source: gembundler.com
I forked the sinbook gem and added the git repo to my Gemfile. But the sinatra-authentication gem, which depends on sinbook, throws Gem::LoadError.
Why isn't my version of the gem being used?
Gemfile
source :rubygems
gem 'sinatra'
gem 'sinatra-contrib'
gem 'sequel'
gem 'jruby-openssl'
gem 'rack-flash'
gem 'sinbook', git: 'https://github.com/JamesGecko/sinbook'
gem 'sinatra-authentication'
gem 'json-jruby'
gem 'coffee-script'
gem 'therubyrhino'
error
PS C:\users\james\code\portal> jruby -S bundle
Fetching gem metadata from http://rubygems.org/........
Fetching gem metadata from http://rubygems.org/..
Fetching https://github.com/JamesGecko/sinbook
Installing addressable (2.2.8)
Installing backports (2.5.1)
Installing bouncy-castle-java (1.5.0146.1)
Installing coffee-script-source (1.3.1)
Installing multi_json (1.2.0)
Installing execjs (1.3.0)
Installing coffee-script (2.2.0)
Installing dm-core (1.2.0)
Installing dm-migrations (1.2.0)
Installing dm-timestamps (1.2.0)
Installing dm-validations (1.2.0)
Installing eventmachine (0.12.10)
Installing jruby-openssl (0.7.7)
Installing json (1.5.0)
Installing json-jruby (1.5.0)
Installing rack (1.4.1)
Installing rack-flash (0.1.2)
Installing rack-protection (1.2.0)
Installing rack-test (0.6.1)
Installing rufus-tokyo (1.0.7)
Installing sequel (3.34.1)
Installing tilt (1.3.3)
Installing sinatra (1.3.2)
Using sinbook (0.1.9.jamesgecko) from https://github.com/JamesGecko/sinbook (at master)
Installing sinatra-authentication (0.4.1)
Installing sinatra-contrib (1.3.1)
Installing therubyrhino (1.73.2)
Using bundler (1.1.4)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
PS C:\users\james\code\portal> jruby .\app.rb
Gem::LoadError: Could not find sinbook (>= 0) amongst [addressable-2.2.8, backports-2.5.1, bouncy-castle-java-1.5.0146.1, bundler-1.1.4, coffee-script-2.2.0, coffee-script-source-1.3.1, dm-core-1.2.0, dm-migrations-1.2.0, dm-timestamps-1.2.0, dm-validations-1.2.0, eventmachine-0.12.10-java, execjs-1.3.0, jruby-openssl-0.7.7, jruby-win32ole-0.8.5, json-1.5.0-java, json-jruby-1.5.0-java, multi_json-1.2.0, rack-1.4.1, rack-flash-0.1.2, rack-protection-1.2.0, rack-test-0.6.1, rake-0.9.2.2, rufus-tokyo-1.0.7, sequel-3.34.1, sinatra-1.3.2, sinatra-authentication-0.4.1, sinatra-contrib-1.3.1, therubyrhino-1.73.2, tilt-1.3.3]
to_specs at c:/dev/jruby-1.7.0.preview1/lib/ruby/shared/rubygems/dependency.rb:247
activate_dependencies at c:/dev/jruby-1.7.0.preview1/lib/ruby/shared/rubygems/specification.rb:777
each at org/jruby/RubyArray.java:1611
activate_dependencies at c:/dev/jruby-1.7.0.preview1/lib/ruby/shared/rubygems/specification.rb:766
activate at c:/dev/jruby-1.7.0.preview1/lib/ruby/shared/rubygems/specification.rb:750
try_activate at c:/dev/jruby-1.7.0.preview1/lib/ruby/shared/rubygems.rb:212
require at c:/dev/jruby-1.7.0.preview1/lib/ruby/shared/rubygems/custom_require.rb:59
require at c:/dev/jruby-1.7.0.preview1/lib/ruby/shared/rubygems/custom_require.rb:55
(root) at .\app.rb:7
app.rb
require 'sinatra'
require 'sinatra/reloader'
require 'json'
require 'digest/sha1'
require 'rack-flash'
require 'sinatra-authentication'
use Rack::Session::Cookie, secret: 'foobar'
use Rack::Flash
# ...
Add require "bundler/setup" to app.rb. It it needed to load the bundled environment. More info may be found in the bundler documentation.
Since you're using Sinatra, you may also want to look into using config.ru.