how do you solve this? i did bundle install yet i still get errors from below.
unable to run rails server when it shows all bundles are installed. please help me out.
Master:disrupreneurs shaunstanislaus$ bundle install
Using rake (10.0.2)
Using i18n (0.6.1)
Using multi_json (1.3.7)
Using activesupport (3.2.8)
Using builder (3.0.4)
Using activemodel (3.2.8)
Using erubis (2.7.0)
Using journey (1.0.4)
Using rack (1.4.1)
Using rack-cache (1.2)
Using rack-test (0.6.2)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.1.3)
Using actionpack (3.2.8)
Using mime-types (1.19)
Using polyglot (0.3.3)
Using treetop (1.4.12)
Using mail (2.4.4)
Using actionmailer (3.2.8)
Using arel (3.0.2)
Using tzinfo (0.3.35)
Using activerecord (3.2.8)
Using activeresource (3.2.8)
Using coffee-script-source (1.4.0)
Using execjs (1.4.0)
Using coffee-script (2.2.0)
Using rack-ssl (1.3.2)
Using json (1.7.5)
Using rdoc (3.12)
Using thor (0.16.0)
Using railties (3.2.8)
Using coffee-rails (3.2.2)
Using diff-lcs (1.1.3)
Using multipart-post (1.1.5)
Using faraday (0.8.4)
Using hashie (1.2.0)
Using httpauth (0.2.0)
Using jquery-rails (2.1.4)
Using jwt (0.1.5)
Using oauth (0.4.7)
Using oauth2 (0.8.0)
Using omniauth (1.1.1)
Using omniauth-oauth2 (1.1.1)
Using omniauth-facebook (1.4.1) from git://github.com/mkdynamic/omniauth-facebook.git (at master)
Using omniauth-google-oauth2 (0.1.13)
Using omniauth-google-plus-oauth2 (0.0.1) from https://github.com/luke-gru/omniauth- google-plus-oauth2.git (at master)
Using omniauth-oauth (1.0.1)
Using omniauth-twitter (0.0.14) from https://github.com/arunagw/omniauth-twitter.git (at master)
Using bundler (1.2.2)
Using rails (3.2.8)
Using rb-readline (0.4.2)
Using rspec-core (2.12.0)
Using rspec-expectations (2.12.0)
Using rspec-mocks (2.12.0)
Using rspec (2.12.0)
Using sass (3.2.3)
Using sass-rails (3.2.5)
Using sqlite3 (1.3.6)
Using twitter-bootstrap-rails (2.1.6) from git://github.com/seyhunak/twitter-bootstrap- rails.git (at master)
Using uglifier (1.3.0)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
from this part it keeps failing to run rails s
how do i solve this'?
Master:disrupreneurs shaunstanislaus$ rails s
=> Booting WEBrick
=> Rails 3.2.8 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/Users/shaunstanislaus/.rvm/gems/ruby-1.9.3-p194/gems/railties- 3.2.8/lib/rails/railtie/configuration.rb:85:in `method_missing': undefined method `less' for # <Rails::Application::Configuration:0x007fe5032ffa18> (NoMethodError)
from /Users/shaunstanislaus/.rvm/gems/ruby-1.9.3-p194/bundler/gems/twitter-bootstrap- rails-4ac83ab51931/lib/twitter/bootstrap/rails/engine.rb:15:in `block in <class:Engine>'
from /Users/shaunstanislaus/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/shaunstanislaus/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `run'
from /Users/shaunstanislaus/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/shaunstanislaus/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `each'
from /Users/shaunstanislaus/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/shaunstanislaus/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/application.rb:136:in `initialize!'
from /Users/shaunstanislaus/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/shaunstanislaus/Documents/developer/web/disrupreneurs/config/environment.rb:5:in `<top (required)>'
from /Users/shaunstanislaus/Documents/developer/web/disrupreneurs/config.ru:4:in `require'
from /Users/shaunstanislaus/Documents/developer/web/disrupreneurs/config.ru:4:in `block in <main>'
from /Users/shaunstanislaus/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
from /Users/shaunstanislaus/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
from /Users/shaunstanislaus/Documents/developer/web/disrupreneurs/config.ru:1:in `new'
from /Users/shaunstanislaus/Documents/developer/web/disrupreneurs/config.ru:1:in `<main>'
from /Users/shaunstanislaus/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:40:in `eval'
from /Users/shaunstanislaus/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:40:in `parse_file'
from /Users/shaunstanislaus/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/server.rb:200:in `app'
from /Users/shaunstanislaus/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/commands/server.rb:46:in `app'
from /Users/shaunstanislaus/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/server.rb:301:in `wrapped_app'
from /Users/shaunstanislaus/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/server.rb:252:in `start'
from /Users/shaunstanislaus/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/commands/server.rb:70:in `start'
from /Users/shaunstanislaus/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/commands.rb:55:in `block in <top (required)>'
from /Users/shaunstanislaus/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/commands.rb:50:in `tap'
from /Users/shaunstanislaus/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Also add gem 'less-rails'
Check out this post too:
Rails railties gem error "undefined method: 'less'"
Add in gemfile:
gem "therubyracer"
and run bundle install again
Related
I am following this tutorial and have just started. I have installed Ruby on Rails with gem install rails and have created a blog with rails new blog.
The tutorial now says that I need to run rails generate controller Welcome index, however when I do, I get this error:
C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.2/lib/thor/parser/option.rb:130:in `validate_default_type!': An option's default must match its type. (ArgumentError)
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.2/lib/thor/parser/option.rb:113:in `validate!'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.2/lib/thor/parser/argument.rb:24:in `initialize'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.2/lib/thor/parser/option.rb:9:in `initialize'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.2/lib/thor/base.rb:544:in `new'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.2/lib/thor/base.rb:544:in `build_option'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.2/lib/thor/base.rb:278:in `class_option'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/generators/base.rb:202:in `class_option'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/generators/base.rb:178:in `block in hook_for'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/generators/base.rb:168:in `each'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/generators/base.rb:168:in `hook_for'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/jbuilder-2.6.0/lib/generators/rails/scaffold_controller_generator.rb:9:in `<class:ScaffoldControllerGenerator>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/jbuilder-2.6.0/lib/generators/rails/scaffold_controller_generator.rb:6:in `<module:Generators>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/jbuilder-2.6.0/lib/generators/rails/scaffold_controller_generator.rb:5:in `<module:Rails>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/jbuilder-2.6.0/lib/generators/rails/scaffold_controller_generator.rb:4:in `<top (required)>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `block in require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/jbuilder-2.6.0/lib/jbuilder/railtie.rb:32:in `block in <class:Railtie>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/railtie.rb:230:in `call'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/railtie.rb:230:in `block in run_generators_blocks'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/railtie.rb:247:in `each'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/railtie.rb:247:in `each_registered_block'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/railtie.rb:230:in `run_generators_blocks'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/application.rb:453:in `block in run_generators_blocks'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/engine/railties.rb:13:in `each'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/engine/railties.rb:13:in `each'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/application.rb:453:in `run_generators_blocks'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/engine.rb:465:in `load_generators'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:144:in `generate_or_destroy'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:60:in `generate'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/commands.rb:18:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
I have found a similar question on Stack Overflow asking the same question here, but the poster never responded when asked to show his gem list. So here's mine:
actioncable (5.0.0.1)
actionmailer (5.0.0.1)
actionpack (5.0.0.1)
actionview (5.0.0.1)
activejob (5.0.0.1)
activemodel (5.0.0.1)
activerecord (5.0.0.1)
activesupport (5.0.0.1)
arel (7.1.4)
bigdecimal (1.2.7, default: 1.2.6)
builder (3.2.2)
bundler (1.13.6)
coffee-rails (4.2.1)
coffee-script (2.4.1)
coffee-script-source (1.11.1)
concurrent-ruby (1.0.2)
debug_inspector (0.0.2)
erubis (2.7.0)
execjs (2.7.0)
globalid (0.3.7)
i18n (0.7.0)
io-console (0.4.6, default: 0.4.3)
jbuilder (2.6.0)
jquery-rails (4.2.1)
json (2.0.2, default: 1.8.1)
loofah (2.0.3)
mail (2.6.4)
method_source (0.8.2)
mime-types (3.1)
mime-types-data (3.2016.0521)
mini_portile2 (2.1.0)
minitest (5.9.1, 5.4.3)
multi_json (1.12.1)
nio4r (1.2.1)
nokogiri (1.6.8.1 x86-mingw32)
power_assert (0.3.1, 0.2.2)
psych (2.2.0, default: 2.0.8)
puma (3.6.2)
rack (2.0.1, 1.6.4)
rack-protection (1.5.3)
rack-test (0.6.3)
rails (5.0.0.1)
rails-dom-testing (2.0.1)
rails-html-sanitizer (1.0.3)
railties (5.0.0.1)
rake (11.3.0, default: 10.4.2)
rdoc (5.0.0, default: 4.2.0)
sass (3.4.22)
sass-rails (5.0.6)
sinatra (1.4.7)
sprockets (3.7.0)
sprockets-rails (3.2.0)
sqlite3 (1.3.12 x86-mingw32)
test-unit (3.2.3, 3.0.8)
thor (0.19.2, 0.19.1)
thread_safe (0.3.5)
tilt (2.0.5)
turbolinks (5.0.1)
turbolinks-source (5.0.0)
tzinfo (1.2.2)
tzinfo-data (1.2016.10)
uglifier (3.0.3)
web-console (3.4.0)
websocket-driver (0.6.4)
websocket-extensions (0.1.2)
Has anybody encountered this error before? If so, how did you resolve it?
A temporary fix is to set the version of Thor in your gemfile to the last release.
gem 'thor', '0.19.1'
It seems the latest gem release broke it. Once that gets fixed, then this error should go away.
For anyone having trouble creating a new Ruby on Rails application or anything else like middleman, you can uninstall Thor and install the older version specifically:
gem uninstall thor
gem install thor -v 0.19.1
I have had a similar issue tonight with Thor 0.19.2.
Here is what worked for me. Please ensure that you backup all data. I am very new to Rails, so I don't know what the consequences of this will be.
First, you need to remove Thor 0.19.2.
gem uninstall thor
Type 'Y' when it asks you confirm removal. Then, install the previous version of Thor.
gem install thor -v 0.19.1
You might get an error about being locked to 0.19.2 - go into your project's gemfile.lock, and find the line containing Thor. Change 0.19.2 to 0.19.1.
You might need to restart any terminal windows you have open. Good luck!
I just ran into this myself. I've been working with Rails for almost a year so I was like "Uhhhhh so do I not know what I'm doing? Orrrr?" xD.
I'm on an Ubuntu-based Linux distro.
I added this line to my Gemfile:
gem 'thor', '0.19.1'
I then ran the command "bundle update thor" to make it grab the exact version I needed. Now my generators work again.
You can also try:
bundle update thor
It worked for me.
When I'm doing bundle install, I got the exception below. What is this?
rajesh#rajesh:~/workspace/Cybermedia_Test$ bundle install
Fetching gem metadata from http://rubygems.org/.Unfortunately, a fatal error has occurred. Please see the Bundler
troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
/home/rajesh/.rvm/gems/ruby-1.9.3-p385#global/gems/bundler-1.2.4/lib/bundler/fetcher.rb:174:in `load': marshal data too short (ArgumentError)
from /home/rajesh/.rvm/gems/ruby-1.9.3-p385#global/gems/bundler-1.2.4/lib/bundler/fetcher.rb:174:in `fetch_dependency_remote_specs'
from /home/rajesh/.rvm/gems/ruby-1.9.3-p385#global/gems/bundler-1.2.4/lib/bundler/fetcher.rb:128:in `fetch_remote_specs'
from /home/rajesh/.rvm/gems/ruby-1.9.3-p385#global/gems/bundler-1.2.4/lib/bundler/fetcher.rb:76:in `specs'
from /home/rajesh/.rvm/gems/ruby-1.9.3-p385#global/gems/bundler-1.2.4/lib/bundler/source.rb:234:in `block in remote_specs'
from /home/rajesh/.rvm/gems/ruby-1.9.3-p385#global/gems/bundler-1.2.4/lib/bundler/source.rb:232:in `each'
from /home/rajesh/.rvm/gems/ruby-1.9.3-p385#global/gems/bundler-1.2.4/lib/bundler/source.rb:232:in `remote_specs'
from /home/rajesh/.rvm/gems/ruby-1.9.3-p385#global/gems/bundler-1.2.4/lib/bundler/source.rb:165:in `fetch_specs'
from /home/rajesh/.rvm/gems/ruby-1.9.3-p385#global/gems/bundler-1.2.4/lib/bundler/source.rb:70:in `specs'
from /home/rajesh/.rvm/gems/ruby-1.9.3-p385#global/gems/bundler-1.2.4/lib/bundler/lazy_specification.rb:53:in `__materialize__'
from /home/rajesh/.rvm/gems/ruby-1.9.3-p385#global/gems/bundler-1.2.4/lib/bundler/spec_set.rb:86:in `block in materialize'
from /home/rajesh/.rvm/gems/ruby-1.9.3-p385#global/gems/bundler-1.2.4/lib/bundler/spec_set.rb:83:in `map!'
from /home/rajesh/.rvm/gems/ruby-1.9.3-p385#global/gems/bundler-1.2.4/lib/bundler/spec_set.rb:83:in `materialize'
from /home/rajesh/.rvm/gems/ruby-1.9.3-p385#global/gems/bundler-1.2.4/lib/bundler/definition.rb:113:in `specs'
from /home/rajesh/.rvm/gems/ruby-1.9.3-p385#global/gems/bundler-1.2.4/lib/bundler/definition.rb:108:in `resolve_remotely!'
from /home/rajesh/.rvm/gems/ruby-1.9.3-p385#global/gems/bundler-1.2.4/lib/bundler/installer.rb:83:in `run'
from /home/rajesh/.rvm/gems/ruby-1.9.3-p385#global/gems/bundler-1.2.4/lib/bundler/installer.rb:14:in `install'
from /home/rajesh/.rvm/gems/ruby-1.9.3-p385#global/gems/bundler-1.2.4/lib/bundler/cli.rb:231:in `install'
from /home/rajesh/.rvm/gems/ruby-1.9.3-p385#global/gems/bundler-1.2.4/lib/bundler/vendor/thor/task.rb:27:in `run'
from /home/rajesh/.rvm/gems/ruby-1.9.3-p385#global/gems/bundler-1.2.4/lib/bundler/vendor/thor/invocation.rb:120:in `invoke_task'
from /home/rajesh/.rvm/gems/ruby-1.9.3-p385#global/gems/bundler-1.2.4/lib/bundler/vendor/thor.rb:275:in `dispatch'
from /home/rajesh/.rvm/gems/ruby-1.9.3-p385#global/gems/bundler-1.2.4/lib/bundler/vendor/thor/base.rb:408:in `start'
from /home/rajesh/.rvm/gems/ruby-1.9.3-p385#global/gems/bundler-1.2.4/bin/bundle:14:in `block in <top (required)>'
from /home/rajesh/.rvm/gems/ruby-1.9.3-p385#global/gems/bundler-1.2.4/lib/bundler/friendly_errors.rb:4:in `with_friendly_errors'
from /home/rajesh/.rvm/gems/ruby-1.9.3-p385#global/gems/bundler-1.2.4/bin/bundle:14:in `<top (required)>'
from /home/rajesh/.rvm/gems/ruby-1.9.3-p385#global/bin/bundle:19:in `load'
from /home/rajesh/.rvm/gems/ruby-1.9.3-p385#global/bin/bundle:19:in `<main>'
from /home/rajesh/.rvm/gems/ruby-1.9.3-p385/bin/ruby_noexec_wrapper:14:in `eval'
from /home/rajesh/.rvm/gems/ruby-1.9.3-p385/bin/ruby_noexec_wrapper:14:in `<main>'
* LOCAL GEMS *
actionmailer (3.1.3)
actionpack (3.1.3)
activemodel (3.1.3)
activerecord (3.1.3)
activeresource (3.1.3)
activesupport (3.1.3)
ansi (1.4.3)
arel (2.2.3)
bigdecimal (1.1.0)
builder (3.0.4)
bundler (1.2.4)
coffee-rails (3.1.1)
coffee-script (2.2.0)
coffee-script-source (1.4.0)
erubis (2.7.0)
execjs (1.4.0)
hike (1.2.1)
i18n (0.6.1)
io-console (0.3)
jquery-rails (2.2.1)
json (1.7.7, 1.5.4)
mail (2.3.3)
mime-types (1.21)
minitest (2.5.1)
multi_json (1.6.1)
polyglot (0.3.3)
rack (1.3.10)
rack-cache (1.2)
rack-mount (0.8.3)
rack-ssl (1.3.3)
rack-test (0.6.2)
rails (3.1.3)
railties (3.1.3)
rake (10.0.3, 0.9.2.2)
rdoc (3.12.1, 3.9.5)
rubygems-bundler (1.1.0)
rvm (1.11.3.6)
sass (3.2.5)
sass-rails (3.1.7)
sprockets (2.0.4)
sqlite3 (1.3.7)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.12)
turn (0.8.3)
tzinfo (0.3.35)
uglifier (1.3.0)
Some suggestions:
update bundler: gem update bundler
update rubygems: gem update --system
I ran into a similar problem recently, and I realised that the problem was in the configuration file in the .bundle directory (I downloaded the project from its production folder). I fixed the problem deleting the entire .bundle folder.
this worked for me
gem uninstall atomic tzinfo
#select 'All versions' for both
gem install atomic tzinfo
This is an obvious (in hindsight) problem, but for me, I got this error because I was tethered to my phone, so I was running a program called TripMode which blocks most network traffic by default. Granting network access to Ruby allowed bundler to connect properly.
I'm having trouble getting the pg gem working with my rails app.
When I do a sudo bundle install I get:
Using rake (10.0.4)
Using i18n (0.6.4)
Using multi_json (1.7.2)
Using activesupport (3.2.8)
Using builder (3.0.4)
Using activemodel (3.2.8)
Using erubis (2.7.0)
Using journey (1.0.4)
Using rack (1.4.5)
Using rack-cache (1.2)
Using rack-test (0.6.2)
Using hike (1.2.1)
Using tilt (1.3.6)
Using sprockets (2.1.3)
Using actionpack (3.2.8)
Using mime-types (1.22)
Using polyglot (0.3.3)
Using treetop (1.4.12)
Using mail (2.4.4)
Using actionmailer (3.2.8)
Using arel (3.0.2)
Using tzinfo (0.3.37)
Using activerecord (3.2.8)
Using activeresource (3.2.8)
Using coffee-script-source (1.6.2)
Using execjs (1.4.0)
Using coffee-script (2.2.0)
Using rack-ssl (1.3.3)
Using json (1.7.7)
Using rdoc (3.12.2)
Using thor (0.18.1)
Using railties (3.2.8)
Using coffee-rails (3.2.2)
Using jquery-rails (2.2.1)
Using pg (0.15.0)
Using bundler (1.1.5)
Using rails (3.2.8)
Using sass (3.2.7)
Using sass-rails (3.2.6)
Using uglifier (1.3.0)
However, when I do a 'bundle show' for any gem, I get:
Could not find pg-0.15.0 in any of the sources
Additionally, when I do any rake command, I get:
/usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.5/lib/bundler/spec_set.rb:90:in `block in materialize': Could not find pg-0.15.0 in any of the sources (Bundler::GemNotFound)
from /usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.5/lib/bundler/spec_set.rb:83:in `map!'
from /usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.5/lib/bundler/spec_set.rb:83:in `materialize'
from /usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.5/lib/bundler/definition.rb:127:in `specs'
from /usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.5/lib/bundler/environment.rb:27:in `specs'
from /usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/rubygems-bundler-1.0.6/lib/rubygems-bundler/noexec.rb:41:in `candidate?'
from /usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/rubygems-bundler-1.0.6/lib/rubygems-bundler/noexec.rb:60:in `setup'
from /usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/rubygems-bundler-1.0.6/lib/rubygems-bundler/noexec.rb:75:in `<top (required)>'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:9:in `<main>'
I suspect that it has something to do with RVM and what version of Ruby I'm using since I recently changed to 1.9.3. Any ideas?
Try bundle install without sudo.
/Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- spec_helper (LoadError)
from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:251:in `require'
from /Users/jeffreyerickatz/Desktop/sites/demo_app/spec/factories/user.rb:1:in `<top (required)>'
from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:245:in `load'
from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:245:in `block in load'
from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:245:in `load'
from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/factory_girl-4.1.0/lib/factory_girl/find_definitions.rb:20:in `block (2 levels) in find_definitions'
rom /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/factory_girl-4.1.0/lib/factory_girl/find_definitions.rb:19:in `each'
from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/factory_girl-4.1.0/lib/factory_girl/find_definitions.rb:19:in `block in find_definitions'
from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/factory_girl-4.1.0/lib/factory_girl/find_definitions.rb:15:in `each'
from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/factory_girl-4.1.0/lib/factory_girl/find_definitions.rb:15:in `find_definitions'
from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/factory_girl_rails-4.1.0/lib/factory_girl_rails/railtie.rb:26:in `block in <class:Railtie>'
from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.0/lib/active_support/lazy_load_hooks.rb:34:in `call'
from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.0/lib/active_support/lazy_load_hooks.rb:34:in `execute_hook'
from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.0/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.0/lib/active_support/lazy_load_hooks.rb:42:in `each'
from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.0/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.0/lib/rails/application/finisher.rb:60:in `block in <module:Finisher>'
from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.0/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.0/lib/rails/initializable.rb:30:in `run'
from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.0/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.0/lib/rails/initializable.rb:54:in `each'
from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.0/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.0/lib/rails/application.rb:136:in `initialize!'
from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.0/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/jeffreyerickatz/Desktop/sites/demo_app/config/environment.rb:5:in `<top (required)>'
from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.0/lib/rails/application.rb:103:in `require'
from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.0/lib/rails/application.rb:103:in `require_environment!'
from /Users/jeffreyerickatz/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.0/lib/rails/commands.rb:40:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
I get that error (above) when I try to run my rails console, or really do anything. I am assuming some of my gems are not compatible with each other? I am updating from rails 3.1 to rails 3.2.
I recently did a bundle update. This what everything was updated to:
Jeffreys-MacBook-Pro:demo_app jeffreyerickatz$ bundle update
Fetching gem metadata from http://rubygems.org/.......
Fetching gem metadata from http://rubygems.org/..
Using rake (10.0.2)
Using i18n (0.6.1)
Using multi_json (1.3.7)
Installing activesupport (3.2.0)
Using builder (3.0.4)
Installing activemodel (3.2.0)
Using erubis (2.7.0)
Using journey (1.0.4)
Using rack (1.4.1)
Using rack-cache (1.2)
Using rack-test (0.6.2)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.1.3)
Installing actionpack (3.2.0)
Using mime-types (1.19)
Using polyglot (0.3.3)
Using treetop (1.4.12)
Using mail (2.4.4)
Installing actionmailer (3.2.0)
Using arel (3.0.2)
Using tzinfo (0.3.35)
Installing activerecord (3.2.0)
Installing activeresource (3.2.0)
Using annotate (2.5.0)
Using ansi (1.4.3)
Using xml-simple (1.1.2)
Using aws-s3 (0.6.3)
Using multi_xml (0.5.1)
Using httparty (0.9.0)
Using json (1.7.5)
Using nokogiri (1.5.5)
Using uuidtools (2.1.3)
Using aws-sdk (1.3.9)
Using bootstrap-sass (2.0.0)
Using will_paginate (3.0.3)
Using bootstrap-will_paginate (0.0.5)
Using bundler (1.1.5)
Using hsume2-state_machine (1.0.5)
Using call_center (0.1.7)
Using carmen (0.2.13)
Using clockwork (0.4.1)
Using cocaine (0.4.2)
Using coderay (1.0.8)
Using coffee-script-source (1.4.0)
Using execjs (1.4.0)
Using coffee-script (2.2.0)
Using rack-ssl (1.3.2)
Using rdoc (3.12)
Using thor (0.14.6)
Installing railties (3.2.0)
Using coffee-rails (3.2.2)
Using diff-lcs (1.1.3)
Using factory_girl (4.1.0)
Using factory_girl_rails (4.1.0)
Using faker (1.1.2)
Using fakeweb (1.3.0)
Using foreman (0.60.2)
Using googlecharts (1.6.8)
Using listen (0.6.0)
Using lumberjack (1.0.2)
Using method_source (0.8.1)
Using slop (3.3.3)
Using pry (0.9.10)
Using guard (1.5.4)
Using guard-rspec (1.2.1)
Installing jquery-rails (2.1.4)
Using jwt (0.1.5)
Installing nested_form (0.3.1)
Using paperclip (3.3.1)
Using pg (0.14.1)
Using pry-nav (0.2.2)
Using pry-rails (0.2.2)
Installing rails (3.2.0)
Using rest-client (1.6.7)
Using rspec-core (2.7.1)
Using rspec-expectations (2.7.0)
Using rspec-mocks (2.7.0)
Using rspec (2.7.0)
Using rspec-rails (2.7.0)
Using ruby-graphviz (1.0.8)
Installing sass (3.2.3)
Using sass-rails (3.2.5)
Using simple_form (2.0.4)
Using spork (0.9.2)
Using sqlite3 (1.3.6)
Installing timecop (0.5.4)
Using turn (0.9.6)
Using twilio-ruby (3.9.0)
Using uglifier (1.3.0)
By the backtrace, it looks like line 1 of /Users/jeffreyerickatz/Desktop/sites/demo_app/spec/factories/user.rb is trying to load spec_helper.rb - you can safely remove this line, only specs should be requiring spec_helper.
Following Ryan Bates railscast brand new to rspec.
I get
Guard is now watching at '/Users/thealey/Source/rpd31'
Guard::RSpec is running, with RSpec 2!
Running all specs
/Users/thealey/.rvm/gems/ruby-1.9.2-p290#rails31/gems/diff-lcs-1.1.3/lib/diff/lcs.rb:3:in `': Diff is not a module (TypeError)
from /Users/thealey/.rvm/gems/ruby-1.9.2-p290#rails31/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:in `require'
from /Users/thealey/.rvm/gems/ruby-1.9.2-p290#rails31/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:in `block in require'
from /Users/thealey/.rvm/gems/ruby-1.9.2-p290#rails31/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:227:in `load_dependency'
from /Users/thealey/.rvm/gems/ruby-1.9.2-p290#rails31/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:in `require'
from /Users/thealey/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rspec-expectations-2.6.0/lib/rspec/expectations/differ.rb:1:in `'
from /Users/thealey/.rvm/gems/ruby-1.9.2-p290#rails31/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:in `require'
from /Users/thealey/.rvm/gems/ruby-1.9.2-p290#rails31/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:in `block in require'
from /Users/thealey/.rvm/gems/ruby-1.9.2-p290#rails31/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:227:in `load_dependency'
from /Users/thealey/.rvm/gems/ruby-1.9.2-p290#rails31/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:in `require'
from /Users/thealey/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rspec-expectations-2.6.0/lib/rspec/expectations.rb:9:in `'
from /Users/thealey/.rvm/gems/ruby-1.9.2-p290#rails31/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:in `require'
from /Users/thealey/.rvm/gems/ruby-1.9.2-p290#rails31/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:in `block in require'
from /Users/thealey/.rvm/gems/ruby-1.9.2-p290#rails31/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:227:in `load_dependency'
from /Users/thealey/.rvm/gems/ruby-1.9.2-p290#rails31/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:in `require'
from /Users/thealey/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rspec-core-2.6.4/lib/rspec/core/expecting/with_rspec.rb:1:in `'
from /Users/thealey/.rvm/gems/ruby-1.9.2-p290#rails31/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:in `require'
from /Users/thealey/.rvm/gems/ruby-1.9.2-p290#rails31/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:in `block in require'
from /Users/thealey/.rvm/gems/ruby-1.9.2-p290#rails31/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:227:in `load_dependency'
from /Users/thealey/.rvm/gems/ruby-1.9.2-p290#rails31/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:in `require'
from /Users/thealey/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rspec-core-2.6.4/lib/rspec/core/configuration.rb:207:in `block in expect_with'
from /Users/thealey/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rspec-core-2.6.4/lib/rspec/core/configuration.rb:202:in `each'
from /Users/thealey/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rspec-core-2.6.4/lib/rspec/core/configuration.rb:202:in `expect_with'
from /Users/thealey/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rspec-core-2.6.4/lib/rspec/core/configuration.rb:184:in `expectation_frameworks'
from /Users/thealey/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rspec-core-2.6.4/lib/rspec/core/configuration.rb:413:in `configure_expectation_framework'
from /Users/thealey/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:165:in `ensure_example_groups_are_configured'
from /Users/thealey/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:178:in `set_it_up'
from /Users/thealey/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:141:in `subclass'
from /Users/thealey/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:129:in `describe'
from /Users/thealey/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rspec-core-2.6.4/lib/rspec/core/dsl.rb:5:in `describe'
from /Users/thealey/Source/rpd31/spec/requests/create_projects_spec.rb:3:in `'
from /Users/thealey/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rspec-core-2.6.4/lib/rspec/core/configuration.rb:419:in `load'
from /Users/thealey/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rspec-core-2.6.4/lib/rspec/core/configuration.rb:419:in `block in load_spec_files'
from /Users/thealey/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rspec-core-2.6.4/lib/rspec/core/configuration.rb:419:in `map'
from /Users/thealey/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rspec-core-2.6.4/lib/rspec/core/configuration.rb:419:in `load_spec_files'
from /Users/thealey/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rspec-core-2.6.4/lib/rspec/core/command_line.rb:18:in `run'
from /Users/thealey/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:80:in `run_in_process'
from /Users/thealey/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:69:in `run'
from /Users/thealey/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:11:in `block in autorun'
Gemfile is
source 'http://rubygems.org'
gem 'rails', '3.0.10'
gem 'mysql2', '0.2.7'
gem "authlogic"
gem 'activesupport', '3.0.10'
gem 'cancan'
gem 'will_paginate', "~> 3.0"
gem 'calendar_date_select', :git => 'http://github.com/paneq/calendar_date_select.git', :branch => 'rails3test'
gem 'bluecloth'
gem 'rdiscount'
gem 'capybara'
gem 'paperclip'
gem 'mail'
any ideas about how to troubleshoot this appreciated.
Edit: I removed commented out lines from Gemfile.
I put diff into my gemfile no change.
This is the output of bundle.
Using rake (0.9.2)
Using abstract (1.0.0)
Using activesupport (3.0.10)
Using builder (2.1.2)
Using i18n (0.5.0)
Using activemodel (3.0.10)
Using erubis (2.6.6)
Using rack (1.2.3)
Using rack-mount (0.6.14)
Using rack-test (0.5.7)
Using tzinfo (0.3.29)
Using actionpack (3.0.10)
Using mime-types (1.16)
Using polyglot (0.3.2)
Using treetop (1.4.10)
Using mail (2.2.19)
Using actionmailer (3.0.10)
Using arel (2.0.10)
Using activerecord (3.0.10)
Using activeresource (3.0.10)
Using addressable (2.2.6)
Using archive-tar-minitar (0.5.2)
Using authlogic (3.0.3)
Using crack (0.1.8)
Using httparty (0.7.8)
Using multipart-post (1.1.3)
Using faraday (0.7.4)
Using multi_json (1.0.3)
Using oauth2 (0.5.0)
Using bitly (0.6.1)
Using bluecloth (2.1.0)
Using bson (1.3.1)
Using bson_ext (1.3.1)
Using bundler (1.0.18)
Using calendar_date_select (1.16.1) from http://github.com/paneq/calendar_date_select.git (at rails3test)
Using cancan (1.6.5)
Using nokogiri (1.5.0)
Using ffi (1.0.9)
Using childprocess (0.2.2)
Using json_pure (1.6.0)
Using rubyzip (0.9.4)
Using selenium-webdriver (2.5.0)
Using xpath (0.1.4)
Using capybara (1.1.1)
Using chronic (0.6.4)
Using cocaine (0.2.0)
Using colored (1.2)
Using columnize (0.3.4)
Using daemons (1.1.4)
Using diff (0.3.6)
Using diff-lcs (1.1.3)
Using eventmachine (0.12.10)
Using factory_girl (2.1.0)
Using rdoc (3.9.4)
Using thor (0.14.6)
Using railties (3.0.10)
Using factory_girl_rails (1.2.0)
Using git_remote_branch (0.3.0)
Using googlecharts (1.6.7)
Using gravtastic (3.2.6)
Using guard (0.6.3)
Using guard-rspec (0.4.5)
Using htmldiff (0.0.1)
Using ruby_core_source (0.1.5)
Using linecache19 (0.5.12)
Using mysql2 (0.2.7)
Using net-ldap (0.2.2)
Using net-ping (1.5.0)
Using paperclip (2.4.1)
Using rails (3.0.10)
Using rdiscount (1.6.8)
Using ri_cal (0.8.8)
Using riddle (1.4.0)
Using rspec-core (2.6.4)
Using rspec-expectations (2.6.0)
Using rspec-mocks (2.6.0)
Using rspec (2.6.0)
Using rspec-rails (2.6.1)
Using ruby-debug-base19 (0.11.25)
Using ruby-debug19 (0.11.6)
Using seed_dump (0.3.4)
Using thin (1.2.11)
Using thinking-sphinx (2.0.1)
Using time_diff (0.2.1)
Using will_paginate (3.0.pre)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
I had the identical issue. In my case I had a model class called Diff (defined in diff.rb) which led to the issue. I've renamed my class/module and all is well now. I'm somewhat disappointed that this sort of namespace collision could occur.
Other users have also encountered issues with collisions originating from other gems (eg: https://github.com/sunaku/tork/issues/3). If I were troubleshooting the issue, I'd go to your gem directory (use bundle show for any one of your gems to find where they live) and run
find . -name diff.rb
That should tell you all of the libraries that contain a diff.rb file. I'd be looking for one of the more obscure/less actively maintained gems to be the culprit. You'll likely need to find an alternative gem (or contribute a fix the offending gem!) to fix the issue.