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...
Related
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'
I am creating a dashing project, on a Linux machine.
When I do bundle install, it installs all the gems, but when I try to use the gem, it gives me an error and suggests to do bundle install again.
The commands and output follow:
saurabh#my-linux:~/beacon$ bundle install
Using addressable 2.3.8
Using execjs 2.0.2
Using json 1.8.3
Using autoprefixer-rails 6.0.3
Using backports 3.6.6
Using sass 3.2.19
Using bootstrap-sass 3.2.0.2
Using buftok 0.2.0
Using coffee-script-source 1.9.1.1
Using coffee-script 2.2.0
Using daemons 1.2.3
Using rack 1.5.5
Using thread_safe 0.3.5
Using tzinfo 1.2.2
Using rufus-scheduler 2.0.24
Using rack-protection 1.5.3
Using tilt 1.4.1
Using sinatra 1.4.6
Using multi_json 1.11.2
Using rack-test 0.6.3
Using sinatra-contrib 1.4.6
Using hike 1.2.3
Using sprockets 2.10.2
Using eventmachine 1.0.8
Using thin 1.6.4
Using thor 0.18.1
Using dashing 1.3.4
Using unf_ext 0.0.7.1
Using unf 0.1.4
Using domain_name 0.5.25
Using equalizer 0.0.10
Using multipart-post 2.0.0
Using faraday 0.9.2
Using http-cookie 1.0.2
Using http-form_data 1.0.1
Using http_parser.rb 0.6.0
Using http 0.9.8
Using memoizable 0.4.2
Using naught 1.1.0
Using netrc 0.7.9
Using rest_client 1.8.3
Using simple_oauth 0.3.1
Using twitter 5.15.0
Using bundler 1.10.6
Updating files in vendor/cache
Bundle complete! 5 Gemfile dependencies, 44 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
saurabh#my-linux:~/beacon$ bundle show dashing
/usr/lib/lib/ruby/gems/2.1.0/gems/dashing-1.3.4
saurabh#my-linux:~/beacon$ /usr/lib/lib/ruby/gems/2.1.0/gems/dashing-1.3.4/bin/dashing start
/usr/lib/lib/ruby/gems/2.1.0/gems/dashing-1.3.4/lib/dashing/cli.rb:1:in `require': no such file to load -- thor (LoadError)
from /usr/lib/lib/ruby/gems/2.1.0/gems/dashing-1.3.4/lib/dashing/cli.rb:1
from /usr/lib/lib/ruby/gems/2.1.0/gems/dashing-1.3.4/bin/dashing:6:in `require'
from /usr/lib/lib/ruby/gems/2.1.0/gems/dashing-1.3.4/bin/dashing:6
saurabh#my-linux:~/beacon$ dashing start
Could not find addressable-2.3.8 in any of the sources
Run `bundle install` to install missing gems.
saurabh#my-linux:~/beacon$ /usr/lib/lib/ruby/gems/2.1.0/gems/dashing-1.3.4/bin/dashing start
Could not find addressable-2.3.8 in any of the sources
Run `bundle install` to install missing gems.
What am I doing wrong?
sound like 2 options:
you didn't restarted your server after bundle install, please do.
you used sudo to install the gems so they installed to all linux users as root so bottom line they really not in your source path, read more about it here:
Why do "gem" and "sudo gem" have different installation directories?
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.
I'm having an issue with foundation-icons-sass-rails
When i bundle install, it installs without an issue.
$ bundle install
Fetching gem metadata from https://rubygems.org/.........
Using rake 10.3.2
Using i18n 0.6.11
Using json 1.8.1
Using minitest 5.4.1
Using thread_safe 0.3.4
Using tzinfo 1.2.2
Using activesupport 4.1.4
Using builder 3.2.2
Using erubis 2.7.0
Using actionview 4.1.4
Using rack 1.5.2
Using rack-test 0.6.2
Using actionpack 4.1.4
Using mime-types 1.25.1
Using polyglot 0.3.5
Using treetop 1.4.15
Using mail 2.5.4
Using actionmailer 4.1.4
Using activemodel 4.1.4
Using arel 5.0.1.20140414130214
Using activerecord 4.1.4
Using bcrypt 3.1.7
Using coffee-script-source 1.8.0
Using execjs 2.2.1
Using coffee-script 2.3.0
Using thor 0.19.1
Using railties 4.1.4
Using coffee-rails 4.0.1
Using orm_adapter 0.5.0
Using warden 1.2.3
Using devise 3.3.0
Using sass 3.2.19
Using hike 1.2.3
Using multi_json 1.10.1
Using tilt 1.4.1
Using sprockets 2.11.0
Using sprockets-rails 2.1.4
Using sass-rails 4.0.3
Installing foundation-icons-sass-rails 3.0.0
Using foundation-rails 5.4.3.0
Using jquery-rails 3.1.2
Using kaminari 0.16.1
Using mysql2 0.3.16
Using polyamorous 1.1.0
Using bundler 1.6.2
Using rails 4.1.4
Using ransack 1.3.0
Using spring 1.1.3
Using sqlite3 1.3.9
Using turbolinks 2.3.0
Using uglifier 2.5.3
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
And this is the output from trying to start rails console
$ rails c
Could not find foundation-icons-sass-rails-3.0.0 in any of the sources
Run `bundle install` to install missing gems.
I'm using rvm with gemsets.
Ruby 2.1.2
I've tried deleting gemset and all gems, then re-installing etc. and nothing works. Any ideas on this would be amazing, this is killing me!
Thanks!
Try running bin/spring stop to force your application to re-initialize.
I did rails new awesomeapp then when I go to do rails s, I get an error that json-1.8.1 is missing. But when I do bundle install, it's clearly listed. What am I missing?
Donalds-MacBook-Pro:awesomeapp · rails s
Could not find json-1.8.1 in any of the sources
Run `bundle install` to install missing gems.
Donalds-MacBook-Pro:awesomeapp · bundle install
Using rake 10.3.2
Using i18n 0.6.9
Using json 1.8.1
Using minitest 5.3.5
Using thread_safe 0.3.4
Using tzinfo 1.2.1
Using activesupport 4.1.0
Using builder 3.2.2
Using erubis 2.7.0
Using actionview 4.1.0
Using rack 1.5.2
Using rack-test 0.6.2
Using actionpack 4.1.0
Using mime-types 1.25.1
Using polyglot 0.3.5
Using treetop 1.4.15
Using mail 2.5.4
Using actionmailer 4.1.0
Using activemodel 4.1.0
Using arel 5.0.1.20140414130214
Using activerecord 4.1.0
Using sass 3.3.9
Using bootstrap-sass 3.0.1.0
Using sassy-maps 0.4.0
Using breakpoint 2.4.2
Using chunky_png 1.3.1
Using coffee-script-source 1.7.0
Using execjs 2.2.1
Using coffee-script 2.2.0
Using thor 0.19.1
Using railties 4.1.0
Using coffee-rails 4.0.1
Using fssm 0.2.10
Using compass 0.12.2
Using hike 1.2.3
Using multi_json 1.10.1
Using tilt 1.4.1
Using sprockets 2.11.0
Using compass-rails 1.1.7
Using jbuilder 2.1.1
Using jquery-rails 3.1.1
Using normalize-rails 3.0.1
Using bundler 1.6.2
Using sprockets-rails 2.0.1
Using rails 4.1.0
Using rdoc 4.1.1
Using sass-rails 4.0.1
Using sdoc 0.4.0
Using spring 1.1.3
Using sqlite3 1.3.9
Using susy 2.1.0
Using turbolinks 2.2.2
Using uglifier 2.5.1
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
Donalds-MacBook-Pro:awesomeapp · rails s
Could not find json-1.8.1 in any of the sources
Run `bundle install` to install missing gems.
Donalds-MacBook-Pro:awesomeapp ·
I think that you need to update your bundler.
Try running:
bundle update
bundle install
rails s