Pipelining bootstrap into my ruby on rails application to style it - ruby-on-rails

I just added the gem 'bootstrap-sass', '~> 3.3.3' into my gemfile pages. I reinstall the bundle as follows (as specified):
Fetching gem metadata from https://rubygems.org/..........
Fetching version metadata from https://rubygems.org/..
Resolving dependencies...
Installing rake 10.4.2
Installing i18n 0.7.0
Installing json 1.8.2
Installing minitest 5.5.1
Installing thread_safe 0.3.4
Installing tzinfo 1.2.2
Installing activesupport 4.2.0
Installing builder 3.2.2
Installing erubis 2.7.0
Installing mini_portile 0.6.2
Installing nokogiri 1.6.6.2
Installing rails-deprecated_sanitizer 1.0.3
Installing rails-dom-testing 1.0.5
Installing loofah 2.0.1
Installing rails-html-sanitizer 1.0.1
Installing actionview 4.2.0
Installing rack 1.6.0
Installing rack-test 0.6.3
Installing actionpack 4.2.0
Installing globalid 0.3.3
Installing activejob 4.2.0
Installing mime-types 2.4.3
Installing mail 2.6.3
Installing actionmailer 4.2.0
Installing activemodel 4.2.0
Installing arel 6.0.0
Installing activerecord 4.2.0
Installing execjs 2.3.0
Installing autoprefixer-rails 5.1.7
Installing debug_inspector 0.0.2
Installing binding_of_caller 0.7.2
Installing sass 3.4.13
Installing bootstrap-sass 3.3.3
Using bundler 1.8.3
Installing columnize 0.9.0
Installing debugger-linecache 1.2.0
Installing slop 3.6.0
Installing byebug 3.5.1
Installing coffee-script-source 1.9.1
Installing coffee-script 2.3.0
Installing thor 0.19.1
Installing railties 4.2.0
Installing coffee-rails 4.1.0
Installing hike 1.2.3
Installing multi_json 1.10.1
Installing jbuilder 2.2.8
Installing jquery-rails 4.0.3
Installing tilt 1.4.1
Installing sprockets 2.12.3
Installing sprockets-rails 2.2.4
Installing rails 4.2.0
Installing rdoc 4.2.0
Installing sass-rails 5.0.1
Installing sdoc 0.4.1
Installing spring 1.3.3
Installing sqlite3 1.3.10
Installing turbolinks 2.5.3
Installing uglifier 2.7.1
Installing web-console 2.1.0
Bundle complete! 14 Gemfile dependencies, 59 gems now installed.
Gems in the group production were not installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
Post-install message from rdoc:
Depending on your version of ruby, you may need to install ruby rdoc/ri data:
<= 1.8.6 : unsupported
= 1.8.7 : gem install rdoc-data; rdoc-data --install
= 1.9.1 : gem install rdoc-data; rdoc-data --install
>= 1.9.2 : nothing to do! Yay!
All good till here.
Then i added the code #import "bootstrap"; into my styles.css.scss file.
I restarted the server for the changes to reflect in localhost:3000
Then this happens:
rails server
Warning: Running `gem pristine --all` to regenerate your installed gemspecs (and deleting then reinstalling your bundle if you use bundle --path) will improve the startup performance of Spring.
Could not find autoprefixer-rails-5.1.7 in any of the sources
Run `bundle install` to install missing gems.
I tried running 'bundle install' but to my dismay the same error crept up again and again.
So in a jist, the server doesn't start citing "it couldn't find autoprefixer-rails-5.1.7 gem " but if you check the script above it has actually installed it.
Please help me fix this.

I ran the command bundle exec rails s. The server runs now. But it still isn't running if the command rails s is executed. It throws the same error.

Related

Failed to build gem native extension. + rake failed, exit code 1

I got multiple errors when trying to install the gems in a rails application cloned from remote repo, here's a screenshot of the error knowing that I'm still junior with RoR, knowing that I tried many answers but nothing worked
elta3lab#elta3lab-Inspiron-N5110:~/raye7-api$ bundle install
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-mingw32, x86-mswin32. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32`.
Fetching gem metadata from http://rubygems.org/.............
Fetching gem metadata from http://rubygems.org/..
Resolving dependencies...........................................................................
Using rake 12.3.1
Fetching concurrent-ruby 1.1.3
Your user account isn't allowed to install to the system RubyGems.
You can cancel this installation and run:
bundle install --path vendor/bundle
to install the gems into ./vendor/bundle/, or you can enter your password
and install the bundled gems to RubyGems using sudo.
Password:
Your user account isn't allowed to install to the system RubyGems.
You can cancel this installation and run:
bundle install --path vendor/bundle
to install the gems into ./vendor/bundle/, or you can enter your password
and install the bundled gems to RubyGems using sudo.
Password:
Installing concurrent-ruby 1.1.3
Using i18n 0.9.5
Using minitest 5.11.3
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Fetching activesupport 4.2.11
Installing activesupport 4.2.11
Using builder 3.2.3
Using erubis 2.7.0
Using mini_portile2 2.3.0
Fetching nokogiri 1.8.5
Installing nokogiri 1.8.5 with native extensions
Using rails-deprecated_sanitizer 1.0.3
Using rails-dom-testing 1.0.9
Fetching crass 1.0.4
Installing crass 1.0.4
Fetching loofah 2.2.3
Installing loofah 2.2.3
Using rails-html-sanitizer 1.0.4
Fetching actionview 4.2.11
Installing actionview 4.2.11
Fetching rack 1.6.11
Installing rack 1.6.11
Using rack-test 0.6.3
Fetching actionpack 4.2.11
Installing actionpack 4.2.11
Using globalid 0.4.1
Fetching activejob 4.2.11
Installing activejob 4.2.11
Fetching mini_mime 1.0.1
Installing mini_mime 1.0.1
Fetching mail 2.7.1
Installing mail 2.7.1
Fetching actionmailer 4.2.11
Installing actionmailer 4.2.11
Fetching activemodel 4.2.11
Installing activemodel 4.2.11
Using arel 6.0.4
Fetching activerecord 4.2.11
Installing activerecord 4.2.11
Using activerecord-import 0.20.2
Fetching public_suffix 3.0.3
Installing public_suffix 3.0.3
Using addressable 2.5.2
Using bundler 1.16.1
Using thor 0.19.4
Fetching railties 4.2.11
Installing railties 4.2.11
Using hike 1.2.3
Using multi_json 1.13.1
Using tilt 1.4.1
Fetching sprockets 2.12.5
Installing sprockets 2.12.5
Using sprockets-rails 2.3.3
Fetching rails 4.2.11
Installing rails 4.2.11
Fetching apipie-rails 0.5.14
Installing apipie-rails 0.5.14
Using ast 2.4.0
Using execjs 2.7.0
Fetching autoprefixer-rails 9.4.2
Installing autoprefixer-rails 9.4.2
Fetching aws-sigv4 1.0.3
Installing aws-sigv4 1.0.3
Fetching jmespath 1.4.0
Installing jmespath 1.4.0
Fetching aws-sdk-core 2.11.184
Installing aws-sdk-core 2.11.184
Fetching aws-sdk-resources 2.11.184
Installing aws-sdk-resources 2.11.184
Fetching aws-sdk 2.11.184
Installing aws-sdk 2.11.184
Fetching bcrypt 3.1.12
Installing bcrypt 3.1.12 with native extensions
Using bootstrap-datepicker-rails 1.7.1.1
Using sass 3.2.19
Using bootstrap-sass 3.3.5
Using momentjs-rails 2.17.1
Using bootstrap3-datetimepicker-rails 3.1.3
Using bugsnag 6.9.0
Using uniform_notifier 1.10.0
Using bullet 5.6.1
Using byebug 9.1.0
Using cancancan 1.17.0
Using xpath 2.1.0
Using capybara 2.15.4
Using capybara-email 2.5.0
Fetching mime-types-data 3.2018.0812
Installing mime-types-data 3.2018.0812
Fetching mime-types 3.2.2
Installing mime-types 3.2.2
Fetching carrierwave 1.2.3
Installing carrierwave 1.2.3
Using carrierwave-aws 1.2.0
Using carrierwave-base64 2.6.1
Using chartkick 2.2.5
Using coffee-script-source 1.12.2
Using coffee-script 2.4.1
Using coffee-rails 4.0.1
Using sass-rails 4.0.5
Using chosen-rails 1.5.2
Using chronic 0.10.2
Using coderay 1.1.2
Fetching connection_pool 2.2.2
Installing connection_pool 2.2.2
Using cookiejar 0.3.3
Using daemons 1.2.6
Using data_migrate 3.2.2
Using database_cleaner 1.6.2
Fetching delayed_job 4.1.5
Installing delayed_job 4.1.5
Fetching delayed_job_active_record 4.1.3
Installing delayed_job_active_record 4.1.3
Using orm_adapter 0.5.0
Using responders 2.4.0
Using warden 1.2.7
Using devise 4.3.0
Using devise_token_auth 0.1.43
Using diff-lcs 1.3
Using docile 1.1.5
Using unf_ext 0.0.7.5
Using unf 0.1.4
Fetching domain_name 0.5.20180417
Installing domain_name 0.5.20180417
Using eventmachine 1.0.9.1
Using em-socksify 0.3.2
Using http_parser.rb 0.6.0
Using em-http-request 1.1.5
Using email_check 1.0.1
Using erubi 1.7.1
Fetching factory_bot 4.11.1
Installing factory_bot 4.11.1
Fetching factory_bot_rails 4.11.1
Installing factory_bot_rails 4.11.1
Using faker 1.8.7
Using multipart-post 2.0.0
Fetching faraday 0.15.4
Installing faraday 0.15.4
Using faraday_middleware 0.12.2
Using websocket-extensions 0.1.3
Using websocket-driver 0.7.0
Using faye-websocket 0.10.7
Using faye 1.1.2
Using faye-rails 2.0.3
Using multi_xml 0.6.0
Using httparty 0.15.7
Fetching fcm 0.0.6
Installing fcm 0.0.6
Fetching ffi 1.9.25
Installing ffi 1.9.25 with native extensions
Using file_validators 2.1.0
Fetching font-awesome-rails 4.7.0.4
Installing font-awesome-rails 4.7.0.4
Using font-awesome-sass 4.7.0
Using foreman 0.84.0
Using formatador 0.2.5
Using formtastic 3.1.5
Fetching geocoder 1.4.9
Installing geocoder 1.4.9
Fetching geokit 1.13.1
Installing geokit 1.13.1
Fetching geokit-rails 2.3.1
Installing geokit-rails 2.3.1
Using rb-fsevent 0.10.3
Using rb-inotify 0.9.10
Using ruby_dep 1.5.0
Using listen 3.1.5
Fetching lumberjack 1.0.13
Installing lumberjack 1.0.13
Using nenv 0.3.0
Using shellany 0.0.1
Using notiffany 0.1.1
Fetching method_source 0.9.2
Installing method_source 0.9.2
Using pry 0.11.3
Fetching guard 2.15.0
Installing guard 2.15.0
Using guard-compat 1.2.1
Using rspec-support 3.7.1
Using rspec-core 3.7.1
Using rspec-expectations 3.7.0
Using rspec-mocks 3.7.0
Using rspec 3.7.0
Using guard-rspec 4.7.3
Using haml 4.0.7
Using hash-deep-merge 0.1.1
Using hashie 3.5.7
Fetching highline 2.0.0
Installing highline 2.0.0
Using http-cookie 1.0.3
Using json 1.8.6
Fetching hypertrack 0.1.6
Installing hypertrack 0.1.6
Fetching parser 2.5.3.0
Installing parser 2.5.3.0
Fetching rails-i18n 4.0.9
Installing rails-i18n 4.0.9
Fetching rainbow 2.2.2
Installing rainbow 2.2.2 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /tmp/bundler20181204-31799-okhy3brainbow-2.2.2/gems/rainbow-2.2.2/ext
/usr/bin/ruby2.5 mkrf_conf.rb
current directory: /tmp/bundler20181204-31799-okhy3brainbow-2.2.2/gems/rainbow-2.2.2/ext
/usr/bin/ruby2.5 -rrubygems /usr/share/rubygems-integration/all/gems/rake-12.3.1/exe/rake
RUBYARCHDIR=/tmp/bundler20181204-31799-okhy3brainbow-2.2.2/extensions/x86_64-linux/2.5.0/rainbow-2.2.2
RUBYLIBDIR=/tmp/bundler20181204-31799-okhy3brainbow-2.2.2/extensions/x86_64-linux/2.5.0/rainbow-2.2.2
/usr/bin/ruby2.5: No such file or directory -- /usr/share/rubygems-integration/all/gems/rake-12.3.1/exe/rake (LoadError)
rake failed, exit code 1
Gem files will remain installed in /tmp/bundler20181204-31799-okhy3brainbow-2.2.2/gems/rainbow-2.2.2 for inspection.
Results logged to /tmp/bundler20181204-31799-okhy3brainbow-2.2.2/extensions/x86_64-linux/2.5.0/rainbow-2.2.2/gem_make.out
An error occurred while installing rainbow (2.2.2), and Bundler cannot continue.
Make sure that `gem install rainbow -v '2.2.2'` succeeds before bundling.
In Gemfile:
i18n-tasks was resolved to 0.9.28, which depends on
rainbowMake sure that `gem install rainbow -v '2.2.2'` succeeds before bundling.
In Gemfile:
i18n-tasks was resolved to 0.9.28, which depends on
rainbow
and when trying to install rainbow, either with or without sudo, I got this error
Building native extensions. This could take a while...
ERROR: Error installing rainbow:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.5.0/gems/rainbow-2.2.2/ext
/usr/bin/ruby2.5 mkrf_conf.rb
current directory: /var/lib/gems/2.5.0/gems/rainbow-2.2.2/ext
/usr/bin/ruby2.5 -rrubygems /usr/share/rubygems-integration/all/gems/rake-12.3.1/exe/rake RUBYARCHDIR=/var/lib/gems/2.5.0/extensions/x86_64-linux/2.5.0/rainbow-2.2.2 RUBYLIBDIR=/var/lib/gems/2.5.0/extensions/x86_64-linux/2.5.0/rainbow-2.2.2
/usr/bin/ruby2.5: No such file or directory -- /usr/share/rubygems-integration/all/gems/rake-12.3.1/exe/rake (LoadError)
rake failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.5.0/gems/rainbow-2.2.2 for inspection.
Results logged to /var/lib/gems/2.5.0/extensions/x86_64-linux/2.5.0/rainbow-2.2.2/gem_make.out
solved using
sudo gem install rake
sudo gem install rainbow -v '2.2.2'
sudo bundle install

Pushing from Codeanywhere to Heroku - Precompiling assets failed

So I am a noob to coding. I know some html/css, but that is about it. Anyways, I am following the instructions in this poorly formatted ebook on Ruby on Rails. I have set up a container project on codeanywhere. So far I have fixed all errors up to this point through searching. It seems like a lot of people are having this problem, but I have not found a solution. I am trying to push to my Heroku account. Can anyone figure out what I am doing wrong by looking at the log? So far I have added config.assets.initialize_on_precompile = false to my application.rb file because that was one of the potential fixes. Otherwise, I'm lost.
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.4.4
-----> Installing dependencies using bundler 1.15.2
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
Fetching gem metadata from https://rubygems.org/..........
Fetching version metadata from https://rubygems.org/..
Fetching dependency metadata from https://rubygems.org/.
Fetching rake 12.3.1
Fetching concurrent-ruby 1.0.5
Fetching json 1.8.6
Installing rake 12.3.1
Installing concurrent-ruby 1.0.5
Installing json 1.8.6 with native extensions
Fetching minitest 5.11.3
Installing minitest 5.11.3
Fetching thread_safe 0.3.6
Fetching builder 3.2.3
Installing thread_safe 0.3.6
Installing builder 3.2.3
Fetching erubis 2.7.0
Installing erubis 2.7.0
Fetching rack 1.5.5
Installing rack 1.5.5
Fetching mini_mime 1.0.0
Installing mini_mime 1.0.0
Fetching arel 5.0.1.20140414130214
Using bundler 1.15.2
Fetching coffee-script-source 1.12.2
Installing arel 5.0.1.20140414130214
Installing coffee-script-source 1.12.2
Fetching execjs 2.7.0
Installing execjs 2.7.0
Fetching thor 0.20.0
Installing thor 0.20.0
Fetching diff-lcs 1.3
Fetching hike 1.2.3
Installing hike 1.2.3
Installing diff-lcs 1.3
Fetching multi_json 1.13.1
Installing multi_json 1.13.1
Fetching mini_portile2 2.3.0
Fetching pg 0.17.1
Installing mini_portile2 2.3.0
Installing pg 0.17.1 with native extensions
Fetching tilt 1.4.1
Installing tilt 1.4.1
Fetching rails_serve_static_assets 0.0.5
Installing rails_serve_static_assets 0.0.5
Fetching rails_stdout_logging 0.0.5
Installing rails_stdout_logging 0.0.5
Fetching rdoc 4.3.0
Installing rdoc 4.3.0
Fetching rspec-support 3.8.0
Installing rspec-support 3.8.0
Fetching sass 3.2.19
Installing sass 3.2.19
Fetching turbolinks-source 5.1.0
Installing turbolinks-source 5.1.0
Fetching i18n 0.9.5
Installing i18n 0.9.5
Fetching tzinfo 1.2.5
Installing tzinfo 1.2.5
Fetching rack-test 0.6.3
Installing rack-test 0.6.3
Fetching mail 2.7.0
Installing mail 2.7.0
Fetching coffee-script 2.4.1
Installing coffee-script 2.4.1
Fetching uglifier 4.1.17
Installing uglifier 4.1.17
Fetching nokogiri 1.8.4
Installing nokogiri 1.8.4 with native extensions
Fetching sprockets 2.12.5
Installing sprockets 2.12.5
Fetching rails_12factor 0.0.2
Installing rails_12factor 0.0.2
Fetching rspec-core 3.8.0
Installing rspec-core 3.8.0
Fetching rspec-expectations 3.8.1
Installing rspec-expectations 3.8.1
Fetching rspec-mocks 3.8.0
Installing rspec-mocks 3.8.0
Fetching turbolinks 5.1.1
Installing turbolinks 5.1.1
Fetching rspec 3.8.0
Installing rspec 3.8.0
Fetching activesupport 4.1.6
Fetching sdoc 0.4.2
Installing sdoc 0.4.2
Installing activesupport 4.1.6
Fetching actionview 4.1.6
Fetching activemodel 4.1.6
Fetching jbuilder 2.6.4
Installing activemodel 4.1.6
Installing jbuilder 2.6.4
Installing actionview 4.1.6
Fetching activerecord 4.1.6
Installing activerecord 4.1.6
Fetching actionpack 4.1.6
Installing actionpack 4.1.6
Fetching actionmailer 4.1.6
Fetching railties 4.1.6
Fetching sprockets-rails 2.3.3
Installing actionmailer 4.1.6
Installing sprockets-rails 2.3.3
Installing railties 4.1.6
Fetching jquery-rails 3.1.5
Fetching rails 4.1.6
Fetching coffee-rails 4.0.1
Installing coffee-rails 4.0.1
Fetching sass-rails 4.0.5
Installing jquery-rails 3.1.5
Installing sass-rails 4.0.5
Installing rails 4.1.6
Bundle complete! 15 Gemfile dependencies, 54 gems now installed.
Gems in the groups development and test were not installed.
Bundled gems are installed into ./vendor/bundle.
Bundle completed (22.78s)
Cleaning up the bundler cache.
-----> Installing node-v8.10.0-linux-x64
-----> Detecting rake tasks
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
/tmp/build_08716fff5e55005d68d2f9475e33fcff/vendor/bundle/ruby/2.4.0/gems/activesupport-4.1.6/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Fixnum is deprecated
/tmp/build_08716fff5e55005d68d2f9475e33fcff/vendor/bundle/ruby/2.4.0/gems/activesupport-4.1.6/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Bignum is deprecated
Segmentation fault (core dumped)
!
! Precompiling assets failed.
!
! Push rejected, failed to compile Ruby app.
! Push failed
Type $ RAILS_ENV=production rake assets:precompile locally
Let me know if this does work?

Rails deployment to Heroku build failure

I've been deploying my app regularly to Heroku during development with no problems until now.
This build failed after only a couple of minor HTML and CSS changes and still appears to be functioning normally locally. I've since reverted to a previous commit that built successfully but that too results in the same error.
I've only included the topmost section of the build log but can include the rest if it's relevant.
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.3.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.1). 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.4
Using nio4r 2.3.0
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 bcrypt 3.1.11
Using msgpack 1.2.4
Using popper_js 1.12.9
Using rb-fsevent 0.10.3
Using ffi 1.9.23
Using bundler 1.15.2
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 multi_json 1.13.1
Using pg 0.20.0
Using puma 3.11.4
Using tilt 2.0.8
Using i18n 1.0.1
Using tzinfo 1.2.5
Using rack-test 1.0.0
Using warden 1.2.7
Using sprockets 3.7.1
Using websocket-driver 0.7.0
Using mail 2.7.0
Using marcel 0.3.2
Using autoprefixer-rails 8.3.0
Using uglifier 4.1.9
Using bootsnap 1.3.0
Using rb-inotify 0.9.10
Using nokogiri 1.8.2
Using coffee-script 2.4.1
Using activesupport 5.2.0
Using sass-listen 4.0.0
Using globalid 0.4.1
Using activemodel 5.2.0
Using jbuilder 2.7.0
Using sass 3.5.6
Using activejob 5.2.0
Using activerecord 5.2.0
Using rails-dom-testing 2.0.3
Using loofah 2.2.2
Using bootstrap 4.1.0
Using rails-html-sanitizer 1.0.4
Using actionview 5.2.0
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 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! 24 Gemfile dependencies, 68 gems now installed.
Gems in the groups development and test were not installed.
Bundled gems are installed into ./vendor/bundle.
Bundle completed (10.65s)
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.1). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
The latest bundler is 1.16.1, 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
Yarn executable was not detected in the system.
Download Yarn at https://yarnpkg.com/en/docs/install
Asset precompilation completed (1.85s)
Cleaning assets
Running: rake assets:clean
sh: 1: Syntax error: word unexpected (expecting ")")
!
! Command: 'bin/rails runner "puts %Q{heroku_detecting_active_storage_config=#{Rails.application.config.active_storage.service}}"' failed unexpectedly:
! /tmp/build_51f3c3aeade1d66d2890531aa58b477d/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/lib/bundler/rubygems_integration.rb:377:in `block (2 levels) in replace_gem': Error loading the 'sqlite3' Active Record adapter. Missing a gem it depends on? sqlite3 is not part of the bundle. Add it to your Gemfile. (Gem::LoadError)
! from /tmp/build_51f3c3aeade1d66d2890531aa58b477d/vendor/bundle/ruby/2.3.0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/sqlite3_adapter.rb:12:in `<main>'
.
.
.
! Push rejected, failed to compile Ruby app.
! Push failed
This error seems to have been caused by a change to the Heroku Ruby buildpack as described here https://github.com/heroku/heroku-buildpack-ruby/issues/744 and is now fixed.

Why doesn't "bundle exec" see that I have rake installed?

I've been reading StackOverflow and trying to deal with this error for 2 hours now:
bundle exec rake db:setup
Could not find rake-10.4.2 in any of the sources
Run `bundle install` to install missing gems.
I followed the advice here, to no avail:
rails s: Could not find rake-10.4.2 in any of the sources (Bundler::GemNotFound)
also:
Could not find rake with bundle exec
So I did:
gem uninstall rake
gem install rake
And, following the other StackOverflow articles I read, I tried:
rbenv install 2.3.1
Downloading ruby-2.3.1.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.1.tar.bz2
Installing ruby-2.3.1...
Installed ruby-2.3.1 to /Users/lkrubner/.rbenv/versions/2.3.1
rbenv global 2.3.1
ruby -v
ruby 2.0.0p645 (2015-04-13 revision 50299) [universal.x86_64-darwin15]
bundle exec rake db:setup
Could not find rake-10.4.2 in any of the sources
Run `bundle install` to install missing gems.
rbenv rehash
rbenv uninstall rake
rbenv: version `rake' not installed
At the command line, if I look for versions, I see:
rake -V
rake, version 11.2.2
rails -v
Rails 4.2.0
ruby -v
ruby 2.0.0p645 (2015-04-13 revision 50299) [universal.x86_64-darwin15]
but I still get this error:
bundle exec rake db:setup
Could not find rake-10.4.2 in any of the sources
Run `bundle install` to install missing gems.
What would fix this?
Update 1
This is even more confusing:
bundle update rake
Fetching gem metadata from https://rubygems.org/.............
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies...
Installing rake 11.2.2 (was 10.4.2)
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.8.3
Using thread_safe 0.3.5
Using tzinfo 1.2.2
Using activesupport 4.2.0
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile 0.6.2
Using nokogiri 1.6.6.4
Using rails-deprecated_sanitizer 1.0.3
Using rails-dom-testing 1.0.7
Using loofah 2.0.3
Using rails-html-sanitizer 1.0.2
Using actionview 4.2.0
Using rack 1.6.4
Using rack-test 0.6.3
Using actionpack 4.2.0
Using globalid 0.3.6
Using activejob 4.2.0
Using mime-types 2.99
Using mail 2.6.3
Using actionmailer 4.2.0
Using activemodel 4.2.0
Using arel 6.0.3
Using activerecord 4.2.0
Using addressable 2.3.8
Using multi_xml 0.5.5
Using httparty 0.13.7
Using uuidtools 2.1.5
Using aws-sdk 1.3.9
Using bcrypt 3.1.10
Using debug_inspector 0.0.2
Using binding_of_caller 0.7.2
Using bson 3.2.6
Using bson_ext 1.5.1
Using bundler 1.8.5
Using byebug 8.2.1
Using xpath 2.0.0
Using capybara 2.5.0
Using ffi 1.9.10
Using childprocess 0.5.8
Using climate_control 0.0.3
Using cocaine 0.5.8
Using coderay 1.1.0
Using coffee-script-source 1.10.0
Using execjs 2.6.0
Using coffee-script 2.4.1
Using thor 0.19.1
Using railties 4.2.0
Using coffee-rails 4.1.0
Using database_cleaner 1.5.1
Using orm_adapter 0.5.0
Using responders 2.1.0
Using warden 1.2.3
Using devise 3.5.2
Using diff-lcs 1.2.5
Using dotenv 2.1.0
Using dotenv-rails 2.1.0
Using factory_girl 4.5.0
Using factory_girl_rails 4.5.0
Using faker 1.4.3
Using multipart-post 2.0.0
Using faraday 0.9.2
Using sass 3.4.19
Using foundation-rails 5.5.3.2
Using geocoder 1.2.9
Using httpclient 2.6.0.1
Using icalendar 2.3.0
Using multi_json 1.11.2
Using jbuilder 2.3.2
Using jquery-rails 4.0.5
Using jwt 1.5.2
Using kgio 2.9.3
Using method_source 0.8.2
Using mimemagic 0.3.0
Using mongo 2.1.2
Using origin 2.1.1
Using mongoid 5.0.1
Using paperclip 4.3.2
Using mongoid-paperclip 0.0.10
Using oauth2 1.0.0
Using slop 3.6.0
Using pry 0.10.1
Using pry-rails 0.3.4
Using quiet_assets 1.1.0
Using sprockets 3.4.1
Using sprockets-rails 2.3.3
Using rails 4.2.0
Using rails_serve_static_assets 0.0.4
Using rails_stdout_logging 0.0.3
Using rails_12factor 0.0.3
Using raindrops 0.15.0
Using rdoc 4.2.0
Using rspec-support 3.3.0
Using rspec-core 3.3.1
Using rspec-expectations 3.3.0
Using rspec-mocks 3.3.1
Using rspec-rails 3.3.2
Using rspec_junit_formatter 0.2.2
Using rubyzip 1.1.7
Using tilt 2.0.1
Using sass-rails 5.0.4
Using sdoc 0.4.1
Using websocket 1.2.2
Using selenium-webdriver 2.48.1
Using shoulda-matchers 2.8.0
Using signet 0.7.2
Using simple_form 3.2.0
Using spring 1.4.4
Using timezone 0.5.0
Using turbolinks 2.5.3
Using uglifier 2.7.2
Using unicorn 4.9.0
Using web-console 2.2.1
Updating files in vendor/cache
* rake-11.2.2.gem
Removing outdated .gem files from vendor/cache
* rake-10.4.2.gem
Bundle updated!
bundle exec rake db:setup
Could not find rake-11.2.2 in any of the sources
Run `bundle install` to install missing gems.
bundle update rake
So one line says that rake is installed, and the next line says that it is not installed, and both lines are nominally being managed by Bundler, so in theory this can not be a cache problem.
Update 2
I added this to the Gem file:
gem 'rake', '10.5.0'
And then ran
bundle install
which gives me:
Updating files in vendor/cache
Bundle complete! 40 Gemfile dependencies, 116 gems now installed.
Bundled gems are installed into ./vendor/cache.
So then I try:
bundle exec rake db:setup
and I get:
Could not find rake-10.5.0 in any of the sources
Run `bundle install` to install missing gems.
You could try to run install command as sudo and specify rake's version like this:
sudo gem install rake -v '11.2.2'

Using rails 4.1.4 - stuck on 3.2.9

I'm trying to install ruby version 4.1.4. I'm keeping it in specific gem sets
rvm use ruby-2.1.2#rails4.1.4 --create
gem install rails --version=4.1.4
bundle install
rails -v
And I always get back 3.2.9. If I run rails -v before bundle install, I get
Could not find proper version of railties (3.2.9) in any of the
sources Run bundle install to install missing gems.
When I run bundle install, I notice the version of rails is 3.2.9. Is there a simple fix for this.
Fetching gem metadata from https://rubygems.org/.........
Using rake 10.3.2
Using i18n 0.6.11
Using multi_json 1.10.1
Installing activesupport 3.2.9
Installing builder 3.0.4
Installing activemodel 3.2.9
Using erubis 2.7.0
Installing journey 1.0.4
Installing rack 1.4.5
Installing rack-cache 1.2
Using rack-test 0.6.2
Using hike 1.2.3
Using tilt 1.4.1
Installing sprockets 2.2.2
Installing actionpack 3.2.9
Using mime-types 1.25.1
Using polyglot 0.3.5
Using treetop 1.4.15
Installing mail 2.4.4
Installing actionmailer 3.2.9
Installing arel 3.0.3
Installing tzinfo 0.3.40
Installing activerecord 3.2.9
Installing activeresource 3.2.9
Installing coffee-script-source 1.7.1
Installing execjs 2.2.1
Installing coffee-script 2.3.0
Installing rack-ssl 1.3.4
Using json 1.8.1
Installing rdoc 3.12.2
Using thor 0.19.1
Installing railties 3.2.9
Installing coffee-rails 3.2.2
Installing jquery-rails 3.1.1
Using bundler 1.6.5
Installing rails 3.2.9
Installing sass 3.3.11
Installing sass-rails 3.2.6
Installing sqlite3 1.3.9
Installing strong_parameters 0.2.3
Installing uglifier 2.5.3
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
Post-install message from rdoc:
Depending on your version of ruby, you may need to install ruby rdoc/ri data:
<= 1.8.6 : unsupported
= 1.8.7 : gem install rdoc-data; rdoc-data --install
= 1.9.1 : gem install rdoc-data; rdoc-data --install
>= 1.9.2 : nothing to do! Yay!
Any ideas how to get 4.1.4?
Thanks
Firstly, prefix commands with bundle exec where appropriate.
Secondly, have you tried bundle update rails? It could be your Gemfile.lock that's the problem...

Resources