I am trying to run my app on Heroku. I have done a rake db:migrate and confirmed all dependencies. I have also added devise secret key. Additionally, I have added Nodejs and Ruby to my build packs.
The build was successful! and yet when I open the application, it gives me a 503 error.
I have tried to analyse the log but am unable to find exactly what might be causing this issue. Here's the log, please help! -
> -----> Ruby app detected
> -----> Compiling Ruby/Rails
> -----> Using Ruby version: ruby-2.4.1
> -----> Installing dependencies using bundler 1.15.2
> Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
> Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.2). We suggest you
> upgrade to the latest version of Bundler by running `gem install
> bundler`.
> Fetching gem metadata from https://rubygems.org/.........
> Fetching version metadata from https://rubygems.org/..
> Fetching dependency metadata from https://rubygems.org/.
> Using rake 12.3.1
> Using concurrent-ruby 1.0.5
> Using minitest 5.11.3
> Using thread_safe 0.3.6
> Using builder 3.2.3
> Using erubi 1.7.1
> Using mini_portile2 2.3.0
> Using crass 1.0.4
> Using rack 2.0.5
> Using nio4r 2.3.1
> Using websocket-extensions 0.1.3
> Using mini_mime 1.0.0
> Using arel 9.0.0
> Using mimemagic 0.3.2
> Using execjs 2.7.0
> Using aws-eventstream 1.0.0
> Using aws-partitions 1.90.0
> Using aws-sigv4 1.0.2
> Using jmespath 1.4.0
> Using bcrypt 3.1.12
> Using msgpack 1.2.4
> Using rb-fsevent 0.10.3
> Using ffi 1.9.23
> Using bundler 1.15.2
> Using climate_control 0.2.0
> Using cocoon 1.2.11
> Using coffee-script-source 1.12.2
> Using method_source 0.9.0
> Using thor 0.20.0
> Using orm_adapter 0.5.0
> Using temple 0.8.0
> Using tilt 2.0.8
> Using multi_json 1.13.1
> Using mime-types-data 3.2016.0521
> Using pg 1.0.0
> Using puma 3.11.4
> Using rails_serve_static_assets 0.0.5
> Using rails_stdout_logging 0.0.5
> Using tlsmail 0.0.1
> Using turbolinks-source 5.1.0
> Using tzinfo 1.2.5
> Using i18n 1.0.1
> Using nokogiri 1.8.2
> Using rack-test 1.0.0
> Using warden 1.2.7
> Using sprockets 3.7.1
> Using mail 2.7.0
> Using marcel 0.3.2
> Using autoprefixer-rails 8.5.2
> Using uglifier 4.1.11
> Using websocket-driver 0.7.0
> Using bootsnap 1.3.0
> Using rb-inotify 0.9.10
> Using terrapin 0.6.0
> Using coffee-script 2.4.1
> Using aws-sdk-core 3.21.2
> Using mime-types 3.1
> Using rails_12factor 0.0.3
> Using turbolinks 5.1.1
> Using activesupport 5.2.0
> Using haml 5.0.4
> Using loofah 2.2.2
> Using aws-sdk-kms 1.5.0
> Using sass-listen 4.0.0
> Using rails-dom-testing 2.0.3
> Using globalid 0.4.1
> Using activemodel 5.2.0
> Using jbuilder 2.7.0
> Using aws-sdk-s3 1.13.0
> Using activejob 5.2.0
> Using activerecord 5.2.0
> Using paperclip 6.0.0
> Using rails-html-sanitizer 1.0.4
> Using sass 3.5.6
> Using actionview 5.2.0
> Using bootstrap-sass 3.3.7
> Using actionpack 5.2.0
> Using actioncable 5.2.0
> Using actionmailer 5.2.0
> Using activestorage 5.2.0
> Using railties 5.2.0
> Using sprockets-rails 3.2.1
> Using simple_form 4.0.1
> Using coffee-rails 4.2.2
> Using responders 2.4.0
> Using jquery-rails 4.3.3
> Using rails 5.2.0
> Using sass-rails 5.0.7
> Using devise 4.4.3
> Bundle complete! 29 Gemfile dependencies, 89 gems now installed.
> Gems in the groups development and test were not installed.
> Bundled gems are installed into ./vendor/bundle.
> Bundle completed (3.48s)
> Cleaning up the bundler cache.
> Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.2). We suggest you
> upgrade to the latest version of Bundler by running `gem install
> bundler`.
> The latest bundler is 1.16.2, but you are currently running 1.15.2.
> To update, run `gem install bundler`
> -----> Installing node-v8.10.0-linux-x64
> -----> Detecting rake tasks
> -----> Preparing app for Rails asset pipeline
> Running: rake assets:precompile
> /tmp/build_f381a7cc4444b081c9f6475d04f8ebb1/vendor/bundle/ruby/2.4.0/gems/tlsmail-0.0.1/lib/net/smtp.rb:806:
> warning: already initialized constant Net::SMTPSession
> /tmp/build_f381a7cc4444b081c9f6475d04f8ebb1/vendor/bundle/ruby/2.4.0/gems/tlsmail-0.0.1/lib/net/smtp.rb:806:
> warning: previous definition of SMTPSession was here
> /tmp/build_f381a7cc4444b081c9f6475d04f8ebb1/vendor/bundle/ruby/2.4.0/gems/tlsmail-0.0.1/lib/net/pop.rb:687:
> warning: already initialized constant Net::POP
> /tmp/build_f381a7cc4444b081c9f6475d04f8ebb1/vendor/bundle/ruby/2.4.0/gems/tlsmail-0.0.1/lib/net/pop.rb:687:
> warning: previous definition of POP was here
> /tmp/build_f381a7cc4444b081c9f6475d04f8ebb1/vendor/bundle/ruby/2.4.0/gems/tlsmail-0.0.1/lib/net/pop.rb:688:
> warning: already initialized constant Net::POPSession
> /tmp/build_f381a7cc4444b081c9f6475d04f8ebb1/vendor/bundle/ruby/2.4.0/gems/tlsmail-0.0.1/lib/net/pop.rb:688:
> warning: previous definition of POPSession was here
> /tmp/build_f381a7cc4444b081c9f6475d04f8ebb1/vendor/bundle/ruby/2.4.0/gems/tlsmail-0.0.1/lib/net/pop.rb:689:
> warning: already initialized constant Net::POP3Session
> /tmp/build_f381a7cc4444b081c9f6475d04f8ebb1/vendor/bundle/ruby/2.4.0/gems/tlsmail-0.0.1/lib/net/pop.rb:689:
> warning: previous definition of POP3Session was here
> /tmp/build_f381a7cc4444b081c9f6475d04f8ebb1/vendor/bundle/ruby/2.4.0/gems/tlsmail-0.0.1/lib/net/pop.rb:702:
> warning: already initialized constant Net::APOPSession
> /tmp/build_f381a7cc4444b081c9f6475d04f8ebb1/vendor/bundle/ruby/2.4.0/gems/tlsmail-0.0.1/lib/net/pop.rb:702:
> warning: previous definition of APOPSession was here
> Yarn executable was not detected in the system.
> Download Yarn at https://yarnpkg.com/en/docs/install
> Asset precompilation completed (1.67s)
> Cleaning assets
> Running: rake assets:clean
> /tmp/build_f381a7cc4444b081c9f6475d04f8ebb1/vendor/bundle/ruby/2.4.0/gems/tlsmail-0.0.1/lib/net/smtp.rb:806:
> warning: already initialized constant Net::SMTPSession
> /tmp/build_f381a7cc4444b081c9f6475d04f8ebb1/vendor/bundle/ruby/2.4.0/gems/tlsmail-0.0.1/lib/net/smtp.rb:806:
> warning: previous definition of SMTPSession was here
> /tmp/build_f381a7cc4444b081c9f6475d04f8ebb1/vendor/bundle/ruby/2.4.0/gems/tlsmail-0.0.1/lib/net/pop.rb:687:
> warning: already initialized constant Net::POP
> /tmp/build_f381a7cc4444b081c9f6475d04f8ebb1/vendor/bundle/ruby/2.4.0/gems/tlsmail-0.0.1/lib/net/pop.rb:687:
> warning: previous definition of POP was here
> /tmp/build_f381a7cc4444b081c9f6475d04f8ebb1/vendor/bundle/ruby/2.4.0/gems/tlsmail-0.0.1/lib/net/pop.rb:688:
> warning: already initialized constant Net::POPSession
> /tmp/build_f381a7cc4444b081c9f6475d04f8ebb1/vendor/bundle/ruby/2.4.0/gems/tlsmail-0.0.1/lib/net/pop.rb:688:
> warning: previous definition of POPSession was here
> /tmp/build_f381a7cc4444b081c9f6475d04f8ebb1/vendor/bundle/ruby/2.4.0/gems/tlsmail-0.0.1/lib/net/pop.rb:689:
> warning: already initialized constant Net::POP3Session
> /tmp/build_f381a7cc4444b081c9f6475d04f8ebb1/vendor/bundle/ruby/2.4.0/gems/tlsmail-0.0.1/lib/net/pop.rb:689:
> warning: previous definition of POP3Session was here
> /tmp/build_f381a7cc4444b081c9f6475d04f8ebb1/vendor/bundle/ruby/2.4.0/gems/tlsmail-0.0.1/lib/net/pop.rb:702:
> warning: already initialized constant Net::APOPSession
> /tmp/build_f381a7cc4444b081c9f6475d04f8ebb1/vendor/bundle/ruby/2.4.0/gems/tlsmail-0.0.1/lib/net/pop.rb:702:
> warning: previous definition of APOPSession was here
> ###### WARNING:
> We detected that some binary dependencies required to
> use all the preview features of Active Storage are not
> present on this system.
>
> For more information please see:
> https://devcenter.heroku.com/articles/active-storage-on-heroku
>
> ###### WARNING:
> No Procfile detected, using the default web server.
> We recommend explicitly declaring how to boot your server process via a Procfile.
> https://devcenter.heroku.com/articles/ruby-default-web-server
> -----> Discovering process types
> Procfile declares types -> (none)
> Default types for buildpack -> console, rake, web, worker
> -----> Compressing...
> Done: 51.9M
As per the description provided it would be better if you could share the heroku logs as well but meanwhile as described about 503 status code.
A 503 error means "Service Unavailable".
Heroku returns a 503 error when an HTTP request times out between the Heroku routing mesh and your application,
including when the application failed to boot.
This timeout limit is set to 30 seconds, as documented by Heroku, and shows up in the logs as follows.
Please find the below link to get a better understanding of the above description:
http://artsy.github.io/blog/2012/11/15/how-to-monitor-503s-and-timeout-on-heroku/
Check if your page load and queries are well inside the 30 seconds.
For query monitoring use "bullet gem" so that they can be minimized.
Hope it helps!!
Run console from more option on the right top of the application. Open console You can see this kind of console there and input rails console there. heroku run rails console
Then, you will see the complete log of the application and you will find the correct issue that leads the application to 503 status. My issue was adapter typo
Related
when I execute this command to compile my project:
sudo bundle exec fastlane beta
shows this error:
Could not find rake-12.3.3 in any of the sources
Run `bundle install` to install missing gems.
(base)
and I install rake:
$ sudo gem install rake
Password:
Successfully installed rake-13.0.3
Parsing documentation for rake-13.0.3
Done installing documentation for rake after 0 seconds
1 gem installed
(base)
but still not fix the problem. what should I do to make it work? I already execute bundle install, still not fix it:
~/Documents/GitHub/cruise-open/ios on main! ⌚ 17:49:28
$ sudo bundle install
Password:
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine.
Using rake 12.3.3
Using CFPropertyList 3.0.3
Using public_suffix 4.0.6
Using addressable 2.7.0
Using atomos 0.1.3
Using aws-eventstream 1.1.0
Using aws-partitions 1.402.0
Using aws-sigv4 1.2.2
Using jmespath 1.4.0
Using aws-sdk-core 3.110.0
Using aws-sdk-kms 1.39.0
Using aws-sdk-s3 1.86.0
Using babosa 1.0.4
Using bundler 2.2.9
Using claide 1.0.3
Using colored 1.2
Using colored2 3.1.2
Using highline 1.7.10
Using commander-fastlane 4.4.6
Using declarative 0.0.20
Using declarative-option 0.1.0
Using digest-crc 0.6.2
Using unf_ext 0.0.7.7
Using unf 0.1.4
Using domain_name 0.5.20190701
Using dotenv 2.7.6
Using emoji_regex 3.2.1
Using excon 0.78.1
Using multipart-post 2.0.0
Using ruby2_keywords 0.0.2
Using faraday 1.1.0
Using http-cookie 1.0.3
Using faraday-cookie_jar 0.0.7
Using faraday_middleware 1.0.0
Using fastimage 2.2.0
Using gh_inspector 1.1.3
Using jwt 2.2.2
Using memoist 0.16.2
Using multi_json 1.15.0
Using os 1.1.1
Using signet 0.14.0
Using googleauth 0.14.0
Using httpclient 2.8.3
Using mini_mime 1.0.2
Using uber 0.1.0
Using representable 3.0.4
Using retriable 3.1.2
Using google-api-client 0.38.0
Using google-cloud-env 1.4.0
Using google-cloud-errors 1.0.1
Using google-cloud-core 1.5.0
Using google-cloud-storage 1.29.1
Using json 2.3.1
Using mini_magick 4.11.0
Using plist 3.5.0
Using rubyzip 2.3.0
Using security 0.1.3
Using naturally 2.2.0
Using simctl 1.6.8
Using slack-notifier 2.3.2
Using terminal-notifier 2.0.0
Using unicode-display_width 1.7.0
Using terminal-table 1.8.0
Using tty-screen 0.8.1
Using tty-cursor 0.7.1
Using tty-spinner 0.9.3
Using word_wrap 1.0.0
Using nanaimo 0.3.0
Using xcodeproj 1.19.0
Using rouge 2.0.7
Using xcpretty 0.3.0
Using xcpretty-travis-formatter 1.0.0
Using fastlane 2.170.0
Using fastlane-plugin-pgyer 0.2.2
Using xcode-install 2.6.8
Bundle complete! 3 Gemfile dependencies, 75 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
(base)
this is my Gemfile:
source "https://rubygems.org"
gem "xcode-install"
gem "fastlane"
plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)
I have an error message when trying to update Nokogiri gem :
The dependency wdm (~> 0.1.0) will be unused by any of the platforms
Bundler is installing for. Bundler is installing for ruby but the
dependency is only for x86-mswin32, x86-mingw32. To add those
platforms to the bundle, run bundle lock --add-platform x86-mswin32
x86-mingw32. The dependency tzinfo-data (>= 0) will be unused by any
of the platforms Bundler is installing for. Bundler is installing for
ruby but the dependency is only for x86-mswin32, x86-mingw32, java. To
add those platforms to the bundle, run bundle lock --add-platform
x86-mswin32 x86-mingw32 java. Fetching gem metadata from
http://rubygems.org/.............. Fetching gem metadata from
http://rubygems.org/.. Resolving dependencies... Using i18n 0.7.0
Using json 1.8.3 Using minitest 5.7.0 Using thread_safe 0.3.5 Using
tzinfo 1.2.2 Using activesupport 4.1.11 Using addressable 2.3.8 Using
execjs 2.5.2 Using autoprefixer-rails 5.2.1 Using sass 3.4.15 Using
bootstrap-sass 3.3.5 Using bundler 1.16.0 Using hitimes 1.2.2 Using
timers 4.0.1 Using celluloid 0.16.0 Using chunky_png 1.3.4 Using
coffee-script-source 1.9.1.1 Using coffee-script 2.4.1 Using
multi_json 1.11.1 Using compass-core 1.0.3 Using compass-import-once
1.0.5 Using rb-fsevent 0.9.5 Using ffi 1.9.8 Using rb-inotify 0.9.5 Using compass 1.0.3 Using eventmachine 1.0.7 Using http_parser.rb
0.6.0 Using em-websocket 0.5.1 Using erubis 2.7.0 Using font-awesome-sass 4.2.2 Using tilt 1.4.1 Using haml 4.0.6 Using hike
1.2.3 Using uber 0.0.13 Using hooks 0.4.0 Using htmlcompressor 0.2.0 Using thor 0.19.1 Using jquery-middleman 3.1.2 Using kramdown 1.7.0
Using listen 2.10.1 Using padrino-support 0.12.5 Using padrino-helpers
0.12.5 Using rack 1.6.4 Using rack-test 0.6.3 Using middleman-core 3.3.12 Using sprockets 2.12.3 Using sprockets-helpers 1.1.0 Using sprockets-sass 1.3.1 Using middleman-sprockets 3.4.2 Using uglifier
2.7.1 Using middleman 3.3.12 Using middleman-blog 3.5.3 Using net-ssh 2.9.2 Using net-sftp 2.1.2 Using ptools 1.3.2 Using middleman-deploy 1.0.0 Using middleman-disqus 1.1.0 Using rack-livereload 0.3.15 Using middleman-livereload 3.1.1 Using middleman-minify-html 3.4.1 Using
middleman-protect-emails 0.3.1 Using mini_portile2 2.3.0 Fetching
nokogiri 1.8.2 (was 1.6.6.4) Installing nokogiri 1.8.2 (was 1.6.6.4)
with native extensions Gem::Ext::BuildError: ERROR: Failed to build
gem native extension.
current directory: /usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/nokogiri-1.8.2/ext/nokogiri
/usr/local/var/rbenv/versions/2.2.2/bin/ruby -r
./siteconf20180130-47766-zngdwi.rb extconf.rb checking if the C
compiler accepts ... * 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/var/rbenv/versions/2.2.2/bin/$(RUBY_BASE_NAME)
--help --clean
/usr/local/var/rbenv/versions/2.2.2/lib/ruby/2.2.0/mkmf.rb:456:in
try_do': The compiler failed to generate an executable file.
(RuntimeError) You have to install development tools first. from
/usr/local/var/rbenv/versions/2.2.2/lib/ruby/2.2.0/mkmf.rb:571:in
block in try_compile' from
/usr/local/var/rbenv/versions/2.2.2/lib/ruby/2.2.0/mkmf.rb:522:in
with_werror' from
/usr/local/var/rbenv/versions/2.2.2/lib/ruby/2.2.0/mkmf.rb:571:in
try_compile' from extconf.rb:138:in nokogiri_try_compile' from
extconf.rb:162:inblock in add_cflags' from
/usr/local/var/rbenv/versions/2.2.2/lib/ruby/2.2.0/mkmf.rb:619:in
with_cflags' from extconf.rb:161:inadd_cflags' from
extconf.rb:410:in `'
To see why this extension failed to compile, please check the mkmf.log
which can be found here:
/usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-13/2.2.0-static/nokogiri-1.8.2/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in
/usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/nokogiri-1.8.2
for inspection. Results logged to
/usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-13/2.2.0-static/nokogiri-1.8.2/gem_make.out
An error occurred while installing nokogiri (1.8.2), and Bundler
cannot continue. Make sure that gem install nokogiri -v '1.8.2'
succeeds before bundling.
In Gemfile: nokogiri
This helped me on Ubuntu runnung on WSL:
sudo apt-get install build-essential patch ruby-dev zlib1g-dev liblzma-dev
From official Nokogiri installation instructions
For Mac OS, it suggests:
First, make sure you have the latest version of RubyGems and xcode commandline tools:
Run:
gem update --system
xcode-select --install
Then install nokogiri:
gem install nokogiri
There are more troubleshooting tips on that page.
I was working on a file today and all of a sudden when bundling I get an error about bcrypt 3.1.11 . I have scoured the internet as to how to solve this.
$ bundle install
Fetching gem metadata from https://rubygems.org/.........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies.................................
Using rake 11.3.0
/Users/linc/.gem/ruby/2.2.3/gems/bundler-1.11.2/lib/bundler.rb:289: warning: Insecure world writable dir /usr/local/sbin in PATH, mode 040777
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.9.1
Using thread_safe 0.3.5
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile2 2.1.0
Using pkg-config 1.1.7
Using rack 1.6.4
Using mime-types-data 3.2016.0521
Using arel 6.0.3
Using addressable 2.4.0
Installing bcrypt 3.1.11 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/Users/linc/.rubies/ruby-2.2.3/bin/ruby -r ./siteconf20160927-27635-1pd08jr.rb extconf.rb
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling bcrypt_ext.c
clang: error: unable to execute command: Segmentation fault: 11
clang: error: clang frontend command failed due to signal (use -v to see invocation)
Apple LLVM version 8.0.0 (clang-800.0.38)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
clang: note: diagnostic msg: PLEASE submit a bug report to http://developer.apple.com/bugreporter/ and include the crash backtrace, preprocessed source, and associated run script.clang: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /var/folders/0v/x6vrj7v12hd5bghty3yqt7sr0000gn/T/bcrypt_ext-b63617.c
clang: note: diagnostic msg: /var/folders/0v/x6vrj7v12hd5bghty3yqt7sr0000gn/T/bcrypt_ext-b63617.sh
clang: note: diagnostic msg:
********************
make: *** [bcrypt_ext.o] Error 254
make failed, exit code 2
Gem files will remain installed in /Users/linc/.gem/ruby/2.2.3/gems/bcrypt-3.1.11 for inspection.
Results logged to /Users/linc/.gem/ruby/2.2.3/extensions/x86_64-darwin-14/2.2.0-static/bcrypt-3.1.11/gem_make.out
Using bundler 1.11.2
Using coderay 1.1.1
Using concurrent-ruby 1.0.2
Using docile 1.1.5
Using simplecov-html 0.10.0
Using tins 1.12.0
Using thor 0.19.1
Using orm_adapter 0.5.0
Using diff-lcs 1.2.5
Using execjs 2.7.0
Using sass 3.4.22
Using method_source 0.8.2
Using pg 0.19.0
Using slop 3.6.0
Using puma 3.6.0
Using rails_serve_static_assets 0.0.5
Using rails_stdout_logging 0.0.5
Using rspec-support 3.5.0
Using tilt 2.0.5
Using shoulda-context 1.2.1
Using valid_attribute 2.0.0
Using tzinfo 1.2.2
Using nokogiri 1.6.8
Using rack-test 0.6.3
Using warden 1.2.6
Using mime-types 3.1
Using launchy 2.4.3
An error occurred while installing bcrypt (3.1.11), and Bundler cannot continue.
Make sure that `gem install bcrypt -v '3.1.11' succeeds before bundling.
I have done the xcode-select --install and bundle installed and still get the same error.
I have gem uninstall bcrypt "3.1.11" and gem installed bcrypt "3.1.11" again and still get the same error.
Restarted computer and it began working again. Very weird bug
I am looking for an answer to this github issue: https://github.com/guard/listen/issues/399
I am using Windows 7 and trying to run bundle install. I am getting the following error:
mysys:# bundle install
Fetching gem metadata from https://rubygems.org/
Fetching version metadata from https://rubygems.org/
Fetching dependency metadata from https://rubygems.org/
Resolving dependencies..................................................................................................
.............................................................................................................
Using rake 11.1.2
Using addressable 2.3.8
Using multipart-post 2.0.0
Using httpclient 2.6.0.1
Using buff-extensions 1.0.0
Using hashie 2.1.2
Using buff-ruby_engine 0.1.0
Using hitimes 1.2.4
Using nio4r 1.2.1
Using cleanroom 1.0.0
Using minitar 0.5.4
Using retryable 2.0.3
Using buff-ignore 1.1.1
Using erubis 2.7.0
Using json 1.8.3
Using mixlib-log 1.6.0
Using rspec-support 3.4.1
Using diff-lcs 1.2.5
Using semverse 1.2.1
Using molinillo 0.4.5
Using thor 0.19.1
Using ffi 1.9.10
Using libyajl2 1.2.0
Using rack 1.6.4
Using highline 1.7.8
Using mime-types 1.25.1
Using mixlib-cli 1.6.0
Using mixlib-config 2.2.1
Using win32-api 1.5.1
Using net-ssh 2.9.4
Using ipaddress 0.8.3
Using systemu 2.6.5
Using wmi-lite 1.0.0
Using plist 3.1.0
Using coderay 1.1.1
Using method_source 0.8.2
Using slop 3.6.0
Using multi_json 1.12.1
Using nokogiri 1.5.11
Using polyglot 0.3.5
Using yajl-ruby 1.1.0
Using formatador 0.2.5
Using rb-fsevent 0.9.7
Using ruby_dep 1.3.1
Using lumberjack 1.0.10
Using nenv 0.3.0
Using shellany 0.0.1
Using guard-compat 1.2.1
Using safe_yaml 1.0.4
Using ruby-wmi 0.4.0
Using ruby_gntp 0.3.4
Using wdm 0.1.1
Using bundler 1.12.4
Using faraday 0.9.2
Using varia_model 0.4.1
Using buff-shell_out 0.2.0
Using timers 4.0.4
Using rspec-core 3.4.4
Using rspec-expectations 3.4.0
Using rspec-mocks 3.4.1
Using solve 2.0.3
Using win32-process 0.7.3
Using win32-dir 0.4.5
Using win32-ipc 0.6.6
Using win32-mmap 0.4.0
Using win32-service 0.8.2
Using rb-inotify 0.9.7
Using rb-fchange 0.0.6
Installing ffi-yajl 1.4.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ffi-yajl-1.4.0/ext/ffi_yajl/ext/encoder
C:/opscode/chefdk/embedded/bin/ruby.exe -r ./siteconf20160604-8548-n39nif.rb extconf.rb
-IC:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/libyajl2-1.2.0/lib/libyajl2/vendored-libyajl2/include -IC:/opscode/chefdk/embedded/include -O3 -march=i686 -DFD_SETSIZE=2048
-LC:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/libyajl2-1.2.0/lib/libyajl2/vendored-libyajl2/lib -L. -LC:/opscode/chefdk/embedded/lib
creating Makefile
current directory: C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ffi-yajl-1.4.0/ext/ffi_yajl/ext/encoder
make "DESTDIR=" clean
current directory: C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ffi-yajl-1.4.0/ext/ffi_yajl/ext/encoder
make "DESTDIR="
generating encoder-i386-mingw32.def
compiling encoder.c
linking shared-object ffi_yajl/ext/encoder.so
c:/opscode/chefdk/embedded/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lyajldll
collect2.exe: error: ld returned 1 exit status
make: *** [encoder.so] Error 1
make failed, exit code 2
Gem files will remain installed in C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ffi-yajl-1.4.0 for inspection.
Results logged to C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/extensions/x86-mingw32/2.1.0/ffi-yajl-1.4.0/gem_make.out
Using rest-client 1.6.7
Using windows-api 0.4.2
Using net-ssh-gateway 1.2.0
Using fauxhai 3.5.0
Using net-scp 1.2.1
Using pry 0.10.3
Using gherkin 2.11.8
Using treetop 1.4.15
Using notiffany 0.1.0
Using berkshelf-api-client 2.0.0
Using sawyer 0.7.0
Using buff-config 1.0.1
Using celluloid 0.16.0
Using mixlib-authentication 1.4.0
Using rspec 3.4.0
Using win32-event 0.6.1
Using win32-mutex 0.4.1
Installing listen 3.1.5
Gem::InstallError: listen requires Ruby version >= 2.2.3, ~> 2.2.
An error occurred while installing ffi-yajl (1.4.0), and Bundler cannot
continue.
Make sure that gem install ffi-yajl -v '1.4.0' succeeds before bundling.
PS C:\Users\502620480\githubci\og_app_bp-poa-ui> gem install ffi-yajl -v '1.4.0'
Fetching: ffi-1.9.10-x64-mingw32.gem (100%)
Successfully installed ffi-1.9.10-x64-mingw32
Fetching: libyajl2-1.2.0.gem (100%)
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
Successfully installed libyajl2-1.2.0
Fetching: ffi-yajl-1.4.0.gem (100%)
Building native extensions. This could take a while...
Successfully installed ffi-yajl-1.4.0
Parsing documentation for ffi-1.9.10-x64-mingw32
Installing ri documentation for ffi-1.9.10-x64-mingw32
Parsing documentation for libyajl2-1.2.0
unable to convert "\xD0" from ASCII-8BIT to UTF-8 for ext/libyajl2/vendor/yajl/test/parsing/cases/invalid_utf8.json, ski
pping
unable to convert "\x92" from ASCII-8BIT to UTF-8 for ext/libyajl2/vendor/yajl/test/parsing/cases/non_utf8_char_in_strin
g.json, skipping
Installing ri documentation for libyajl2-1.2.0
Parsing documentation for ffi-yajl-1.4.0
Installing ri documentation for ffi-yajl-1.4.0
Done installing documentation for ffi, libyajl2, ffi-yajl after 4 seconds
3 gems installed
PS C:\Users\502620480\githubci\og_app_bp-poa-ui> bundle install
Fetching gem metadata from https://rubygems.org/
Fetching version metadata from https://rubygems.org/
Fetching dependency metadata from https://rubygems.org/
Resolving dependencies..................................................................................................
.............................................................................................................
Using rake 11.1.2
Using addressable 2.3.8
Using multipart-post 2.0.0
Using httpclient 2.6.0.1
Using buff-extensions 1.0.0
Using hashie 2.1.2
Using buff-ruby_engine 0.1.0
Using hitimes 1.2.4
Using nio4r 1.2.1
Using cleanroom 1.0.0
Using minitar 0.5.4
Using retryable 2.0.3
Using buff-ignore 1.1.1
Using erubis 2.7.0
Using json 1.8.3
Using mixlib-log 1.6.0
Using rspec-support 3.4.1
Using diff-lcs 1.2.5
Using semverse 1.2.1
Using molinillo 0.4.5
Using thor 0.19.1
Using ffi 1.9.10
Using libyajl2 1.2.0
Using rack 1.6.4
Using highline 1.7.8
Using mime-types 1.25.1
Using mixlib-cli 1.6.0
Using mixlib-config 2.2.1
Using win32-api 1.5.1
Using net-ssh 2.9.4
Using ipaddress 0.8.3
Using systemu 2.6.5
Using wmi-lite 1.0.0
Using plist 3.1.0
Using coderay 1.1.1
Using method_source 0.8.2
Using slop 3.6.0
Using multi_json 1.12.1
Using nokogiri 1.5.11
Using polyglot 0.3.5
Using yajl-ruby 1.1.0
Using formatador 0.2.5
Using rb-fsevent 0.9.7
Using ruby_dep 1.3.1
Using lumberjack 1.0.10
Using nenv 0.3.0
Using shellany 0.0.1
Using guard-compat 1.2.1
Using safe_yaml 1.0.4
Using ruby-wmi 0.4.0
Using ruby_gntp 0.3.4
Using wdm 0.1.1
Using bundler 1.12.4
Using faraday 0.9.2
Using varia_model 0.4.1
Using buff-shell_out 0.2.0
Using timers 4.0.4
Using rspec-core 3.4.4
Using rspec-expectations 3.4.0
Using rspec-mocks 3.4.1
Using solve 2.0.3
Using win32-process 0.7.3
Using win32-dir 0.4.5
Using win32-ipc 0.6.6
Using win32-mmap 0.4.0
Using win32-service 0.8.2
Using rb-inotify 0.9.7
Using rb-fchange 0.0.6
Installing ffi-yajl 1.4.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ffi-yajl-1.4.0/ext/ffi_yajl/ext/encoder
C:/opscode/chefdk/embedded/bin/ruby.exe -r ./siteconf20160604-3256-1dpveon.rb extconf.rb
-IC:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/libyajl2-1.2.0/lib/libyajl2/vendored-libyajl2/include -IC:/opscode/chefdk/embedded/include -O3 -march=i686 -DFD_SETSIZE=2048
-LC:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/libyajl2-1.2.0/lib/libyajl2/vendored-libyajl2/lib -L. -LC:/opscode/chefdk/embedded/lib
creating Makefile
current directory: C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ffi-yajl-1.4.0/ext/ffi_yajl/ext/encoder
make "DESTDIR=" clean
current directory: C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ffi-yajl-1.4.0/ext/ffi_yajl/ext/encoder
make "DESTDIR="
generating encoder-i386-mingw32.def
compiling encoder.c
linking shared-object ffi_yajl/ext/encoder.so
c:/opscode/chefdk/embedded/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lyajldll
collect2.exe: error: ld returned 1 exit status
make: *** [encoder.so] Error 1
make failed, exit code 2
Gem files will remain installed in C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ffi-yajl-1.4.0 for inspection.
Results logged to C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/extensions/x86-mingw32/2.1.0/ffi-yajl-1.4.0/gem_make.out
Using rest-client 1.6.7
Using windows-api 0.4.2
Using net-ssh-gateway 1.2.0
Using fauxhai 3.5.0
Using net-scp 1.2.1
Using pry 0.10.3
Using gherkin 2.11.8
Using treetop 1.4.15
Using notiffany 0.1.0
Using berkshelf-api-client 2.0.0
Using sawyer 0.7.0
Using buff-config 1.0.1
Using celluloid 0.16.0
Using mixlib-authentication 1.4.0
Using rspec 3.4.0
Using win32-event 0.6.1
Using win32-mutex 0.4.1
Installing listen 3.1.5
Gem::InstallError: listen requires Ruby version >= 2.2.3, ~> 2.2.
An error occurred while installing ffi-yajl (1.4.0), and Bundler cannot
continue.
Make sure that gem install ffi-yajl -v '1.4.0' succeeds before bundling.
I have successfully installed ffi-yajl, but I still get the same error when running bundle install.
I am using following version of binaries.
$ ruby --version
ruby 2.2.4p230 (2015-12-16 revision 53155) [x64-mingw32]
$ which ruby
/c/Ruby22-x64/bin/ruby
$ which gem
/c/Ruby22-x64/bin/gem
$ which bundler
/c/opscode/chefdk/embedded/bin/bundler
DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe
Please suggest what is the issue here? We have been trying from last 2 weeks without any success.
I had the same issue on ruby 2.4. Switching on ruby 2.3 worked for me
If you can't upgrade, you can lock Listen to version 3.0.x, e.g. in your Gemfile:
gem 'listen', '~> 3.0.8'
That's because 3.0.x versions can be installed on older versions of Ruby, but for safety, versions 3.1 and higher are not officially tested with outdated Ruby versions.
That should fix the gem install issue, so I'm closing this.
https://github.com/guard/listen/issues/399#issuecomment-223800740
I'm trying to push heroku master, and I can't get past 'Cleaning up the bundler cache.'
I've tracked down the issue to the oauth2 gem. If I remove that from the Gemfile, bundle install, and push the repo up to Heroku, it deploys just fine. However, my app can't run without it.
Locally, I'm able to run everything.
Logs:
> Initializing repository, done. Counting objects: 90, done. Delta
> compression using up to 4 threads. Compressing objects: 100% (82/82),
> done. Writing objects: 100% (90/90), 27.55 KiB | 0 bytes/s, done.
> Total 90 (delta 38), reused 0 (delta 0)
>
> -----> Ruby app detected
> -----> Compiling Ruby/Rack
> -----> Using Ruby version: ruby-1.9.3
> -----> Installing dependencies using 1.6.3
> Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
> Fetching gem metadata from http://rubygems.org/.........
> Fetching additional metadata from http://rubygems.org/..
> Installing minitest 5.4.2
> Installing i18n 0.6.11
> Installing thread_safe 0.3.4
> Installing builder 3.2.2
> Installing arel 5.0.1.20140414130214
> Installing mini_portile 0.6.0
> Installing multipart-post 2.0.0
> Installing jwt 1.0.0
> Installing rack 1.5.2
> Installing logger 1.2.8
> Installing systemu 2.6.4
> Installing multi_json 1.10.1
> Installing mime-types 2.4.1
> Installing multi_xml 0.5.5
> Installing netrc 0.7.7
> Installing nori 2.4.0
> Installing tilt 1.4.1
> Using bundler 1.6.3
> Installing tzinfo 1.2.2
> Installing gyoku 1.1.1
> Installing json 1.8.1
> Installing faraday 0.9.0
> Installing httpi 2.2.7
> Installing rack-protection 1.5.3
> Installing macaddr 1.7.1
> Installing rest-client 1.7.2
> Installing activesupport 4.1.6
> Installing oauth2 1.0.0
> Installing sinatra 1.4.5
> Installing uuid 2.3.7
> Installing stripe 1.16.0
> Installing activemodel 4.1.6
> Installing activerecord 4.1.6
> Installing sinatra-activerecord 2.0.2
> Installing pg 0.17.1
> Installing nokogiri 1.6.3.1
> Installing akami 1.2.2
> Installing wasabi 3.3.1
> Installing savon 2.7.2
> Installing tax_cloud 0.3.0
> Your bundle is complete!
> Gems in the groups development and test were not installed.
> It was installed into ./vendor/bundle
> Bundle completed (47.32s)
> Cleaning up the bundler cache.