Reputation: 43
Searched high and low... found similar problems, but none of the fixes have helped... Does anyone have an idea of what to try next?
I am following Railstutorial.org 5.1.2 and after installing bootstrap-sass gem, I get the following after restarting apache:
Could not find bootstrap-sass-2.3.2.2 in any of the sources (Bundler::GemNotFound)
/home/bart/.rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/spec_set.rb:92:in `block in materialize'
/home/bart/.rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/spec_set.rb:85:in `map!'
/home/bart/.rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/spec_set.rb:85:in `materialize'
/home/bart/.rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/definition.rb:114:in `specs'
/home/bart/.rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/definition.rb:159:in `specs_for'
/home/bart/.rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/definition.rb:148:in `requested_specs'
/home/bart/.rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/environment.rb:18:in `requested_specs'
/home/bart/.rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/runtime.rb:13:in `setup'
/home/bart/.rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler.rb:120:in `setup'
/home/bart/.rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/setup.rb:17:in `<top (required)>'
/home/bart/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:133:in `require'
/home/bart/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:133:in `rescue in require'
/home/bart/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:142:in `require'
/home/bart/.rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.19/lib/phusion_passenger/loader_shared_helpers.rb:212:in `run_load_path_setup_code'
/home/bart/.rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.19/helper-scripts/rack-preloader.rb:96:in `preload_app'
/home/bart/.rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.19/helper-scripts/rack-preloader.rb:150:in `<module:App>'
/home/bart/.rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.19/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'
/home/bart/.rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.19/helper-scripts/rack-preloader.rb:28:in `<main>'
Bootstrap is installed... (tried version 2.3.2.0 as well)
bart:/var/www/sample_app$ bundle | grep bootstrap
Using bootstrap-sass (2.3.2.2)
and
bart:/var/www/sample_app$ bundle show bootstrap
/home/bart/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/bootstrap-sass-2.3.2.2
Similar issues have been resolved with putting the gem bootstrap-sass into the :asset group in the Gemfile - that didn't help. (e.g., almost exact same thing)
group :assets do
gem 'sass-rails', '4.0.0'
gem 'uglifier', '2.1.1'
gem 'coffee-rails', '4.0.0'
gem 'bootstrap-sass', '2.3.2.0'
end
I actually just added the bcrypt-ruby-3.1.2 gem earlier in the Gemfile and that gave the same problem...
I skipped the end of Ch3 (all of 3.6) where there is a lot more about testing, so maybe I missed a step in there somewhere, but everything in there appeared optional.
Others mention to do a
rake gem
or rake gemspec but I get something like this for both:
bart:/var/www/sample_app$ bundle exec rake gemspec --trace
rake aborted!
Don't know how to build task 'gemspec'
and haven't figured out what that exactly means yet.
More details:
bart:/var/www/sample_app$ rvm info
ruby-2.0.0-p247@railstutorial_rails_4_0:
system:
uname: "Linux 452422 3.2.0-38-generic #61-Ubuntu SMP Tue Feb 19 12:18:21 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux"
system: "ubuntu/12.04/x86_64"
bash: "/bin/bash => GNU bash, version 4.2.24(1)-release (x86_64-pc-linux-gnu)"
zsh: " => not installed"
rvm:
version: "rvm 1.22.15 (stable) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/]"
updated: "1 day 6 hours 36 minutes 3 seconds ago"
path: "/home/bart/.rvm"
ruby:
interpreter: "ruby"
version: "2.0.0p247"
date: "2013-06-27"
platform: "x86_64-linux"
patchlevel: "2013-06-27 revision 41674"
full_version: "ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux]"
homes:
gem: "/home/bart/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0"
ruby: "/home/bart/.rvm/rubies/ruby-2.0.0-p247"
binaries:
ruby: "/home/bart/.rvm/rubies/ruby-2.0.0-p247/bin/ruby"
irb: "/home/bart/.rvm/rubies/ruby-2.0.0-p247/bin/irb"
gem: "/home/bart/.rvm/rubies/ruby-2.0.0-p247/bin/gem"
rake: "/home/bart/.rvm/gems/ruby-2.0.0-p247@global/bin/rake"
environment:
PATH: "/home/bart/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/bin:/home/bart/.rvm/gems/ruby-2.0.0-p247@global/bin:/home/bart/.rvm/rubies/ruby-2.0.0-p247/bin:/home/bart/.rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
GEM_HOME: "/home/bart/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0"
GEM_PATH: "/home/bart/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0:/home/bart/.rvm/gems/ruby-2.0.0-p247@global"
MY_RUBY_HOME: "/home/bart/.rvm/rubies/ruby-2.0.0-p247"
IRBRC: "/home/bart/.rvm/rubies/ruby-2.0.0-p247/.irbrc"
RUBYOPT: ""
gemset: "railstutorial_rails_4_0"
Upvotes: 1
Views: 1978
Reputation: 43
Solved it.
Many thanks for all the suggestions--trying them helped me keep pushing for different causes.
The clue came when rails s
(inside the app) produced good results, but hitting apache didn't. Found the Apache/Passenger setup docs where I had missed (noob to RoR, so actually "didn't know to") set the PassengerRuby in the virtual host config.
According to the tutorial I had created the gemset "railstutorial_rails_4_0" in /home/bart/.rvm/wrappers/ruby-2.0.0-p247@railstutorial_rails_4_0
in /etc/apache2/mods-available/passenger.conf
PassengerRoot /home/bart/.rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.19
PassengerDefaultRuby /home/bart/.rvm/wrappers/ruby-2.0.0-p247/ruby
Which was great until bundle install
put things in the tutorial gemset.
I was missing this in the vhost definition:
PassengerRuby /home/bart/.rvm/wrappers/ruby-2.0.0-p247@railstutorial_rails_4_0/ruby
Restart Apache.
Now it works perfectly!
Upvotes: 2
Reputation: 4959
You have gem 'bootstrap-sass', '2.3.2.0'
specified in your Gemfile but have 2.3.2.2 loaded on your machine. Try uninstalling the gem and re-running the bundle command.
bundle exec gem uninstall GEM_NAME
bundle install
I ran through this tutorial awhile back as well. Looking over my code I never specified a version for bootstrap-sass. You may want to try that as well.
Upvotes: 0