Rails rake throws error : no such file to load -- bundler/setup - ruby-on-rails-3

When I run rake -T (or any rake command) I ran into this error:
$ rake -T
rake aborted!
no such file to load -- bundler/setup
<internal:lib/rubygems/custom_require>:29:in `require'
<internal:lib/rubygems/custom_require>:29:in `require'
/home/myself/rails/RailApp1/config/boot.rb:6:in `<top (required)>'
<internal:lib/rubygems/custom_require>:29:in `require'
<internal:lib/rubygems/custom_require>:29:in `require'
/home/myself/rails/RailApp1/config/application.rb:1:in `<top (required)>'
<internal:lib/rubygems/custom_require>:29:in `require'
<internal:lib/rubygems/custom_require>:29:in `require'
/home/myself/rails/RailApp1/Rakefile:5:in `<top (required)>'
/usr/lib/ruby/1.9.1/rake.rb:2373:in `load'
/usr/lib/ruby/1.9.1/rake.rb:2373:in `raw_load_rakefile'
/usr/lib/ruby/1.9.1/rake.rb:2007:in `block in load_rakefile'
/usr/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
/usr/lib/ruby/1.9.1/rake.rb:2006:in `load_rakefile'
/usr/lib/ruby/1.9.1/rake.rb:1991:in `run'
/usr/bin/rake:28:in `<main>'
I have checked the location of rake and bundler:
$ which rake
/usr/bin/rake
$ which bundle
/usr/bin/bundle
I also found these directory.
/usr/lib/ruby/gems/1.8/gems/bundler-1.0.14/lib/bundler/
/usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/
When I run bundle exec rake *:
$bundle exec rake -T
Could not find rake-0.9.2 in any of the sources
Run 'bundle install' to install missing gems
when I run bundle install in my application:
$bundle install
Using rake (0.9.2)
Using multi_json (1.0.3)
Using activesupport (3.1.1)
Using builder (3.0.0)
Using i18n (0.6.0)
Using activemodel (3.1.1)
Using erubis (2.7.0)
Using rack (1.3.4)
Using rack-cache (1.1)
Using rack-mount (0.8.3)
Using rack-test (0.6.1)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.0.2)
Using actionpack (3.1.1)
Using mime-types (1.16)
Using polyglot (0.3.2)
Using treetop (1.4.10)
Using mail (2.3.0)
Using actionmailer (3.1.1)
Using arel (2.2.1)
Using tzinfo (0.3.30)
Using activerecord (3.1.1)
Using activeresource (3.1.1)
Using bundler (1.0.21)
Using coffee-script-source (1.1.2)
Using execjs (1.2.9)
Using coffee-script (2.2.0)
Using rack-ssl (1.3.2)
Using json (1.6.1)
Using rdoc (3.10)
Using thor (0.14.6)
Using railties (3.1.1)
Using coffee-rails (3.1.1)
Using jquery-rails (1.0.14)
Using rails (3.1.1)
Using sass (3.1.10)
Using sass-rails (3.1.4)
Using sqlite3 (1.3.4)
Using uglifier (1.0.3)
But the error remains, very confused about this..

Related

Any rails command gives noexec.rb:75:in `setup': undefined method `name'

First time question here forgive me if I am not descriptive. Running Ruby 1.8.7 w/ rails 2.3.5 If I run any rails or rake task I get
/home/mathew/.rvm/gems/ruby-1.8.7-p374#global/gems/rubygems-bundler-1.4.2/lib/rubygems-bundler/noexec.rb:75:in `setup': undefined method `name' for #<Array:0x7f45a2fe73a8> (NoMethodError)
from /home/mathew/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `map'
from /home/mathew/.rvm/gems/ruby-1.8.7-p374#global/gems/rubygems-bundler-1.4.2/lib/rubygems-bundler/noexec.rb:75:in `each'
from /home/mathew/.rvm/gems/ruby-1.8.7-p374#global/gems/rubygems-bundler-1.4.2/lib/rubygems-bundler/noexec.rb:75:in `map'
from /home/mathew/.rvm/gems/ruby-1.8.7-p374#global/gems/rubygems-bundler-1.4.2/lib/rubygems-bundler/noexec.rb:75:in `setup'
from /home/mathew/.rvm/gems/ruby-1.8.7-p374#global/gems/rubygems-bundler-1.4.2/lib/rubygems-bundler/noexec.rb:114:in `check'
from /home/mathew/.rvm/gems/ruby-1.8.7-p374#global/gems/rubygems-bundler-1.4.2/lib/rubygems-bundler/noexec.rb:121
from /home/mathew/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /home/mathew/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /home/mathew/.rvm/gems/ruby-1.8.7-p374#global/gems/rubygems-bundler-1.4.2/lib/rubygems_executable_plugin.rb:4
from /home/mathew/.rvm/gems/ruby-1.8.7-p374#global/gems/executable-hooks-1.2.6/lib/executable-hooks/hooks.rb:50:in `call'
from /home/mathew/.rvm/gems/ruby-1.8.7-p374#global/gems/executable-hooks-1.2.6/lib/executable-hooks/hooks.rb:50:in `run'
from /home/mathew/.rvm/gems/ruby-1.8.7-p374#global/gems/executable-hooks-1.2.6/lib/executable-hooks/hooks.rb:49:in `each'
from /home/mathew/.rvm/gems/ruby-1.8.7-p374#global/gems/executable-hooks-1.2.6/lib/executable-hooks/hooks.rb:49:in `run'
from /home/mathew/.rvm/gems/ruby-1.8.7-p374#wholesale/bin/ruby_executable_hooks:10
my gem list is:
*** LOCAL GEMS ***
actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
atomic (1.1.14)
bcrypt-ruby (3.1.2)
bundler (1.3.5)
bundler-unload (1.0.2)
daemons (1.0.10)
delayed_job (2.0.4)
executable-hooks (1.2.6)
hpricot (0.8.4)
i18n (0.6.5, 0.5.0)
json (1.8.1)
minitest (4.7.5)
multi_json (1.8.2)
mysql (2.8.1)
nokogiri (1.4.1)
rack (1.5.2, 1.0.1)
rails (2.3.5)
rake (10.1.0, 0.9.2.2)
rdoc (4.0.1)
rubygems-bundler (1.4.2)
rubygems-update (2.1.10, 1.8.25)
rvm (1.11.3.8)
thread_safe (0.1.3)
tzinfo (0.3.38)
From what I have read bcrypt-ruby and bundler don't play nice together. So I tried to uninstall bundler and rubygems-bundler (because rubygems-bundler is in the error output) but they don't seem to be uninstalled when I run gem list :/ Any help would be appreciated. Thanks!
Seems duplicated with: Rails 2.3.14 not working and the answer there was: Remove bundle from global gemset
$ rvm #global
$ gem uninstall bundler
For those coming from a search engine: In my case, with rubygems 3.1.1 and bundler 2.1.0, the issue was still having rubygems-bundler installed.
Traceback (most recent call last):
6: from /Users/myuser/.rvm/gems/ruby-2.6.3#timing/bin/ruby_executable_hooks:10:in `<main>'
5: from /Users/myuser/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/executable-hooks-1.6.0/lib/executable-hooks/hooks.rb:49:in `run'
4: from /Users/myuser/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/executable-hooks-1.6.0/lib/executable-hooks/hooks.rb:49:in `each'
3: from /Users/myuser/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/executable-hooks-1.6.0/lib/executable-hooks/hooks.rb:50:in `block in run'
2: from /Users/myuser/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/rubygems-bundler-1.4.5/lib/rubygems_executable_plugin.rb:4:in `block in <top (required)>'
1: from /Users/myuser/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:92:in `require'
/Users/myuser/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:92:in `require': cannot load such file -- rubygems-bundler/noexec (LoadError)
10: from /Users/myuser/.rvm/gems/ruby-2.6.3#timing/bin/ruby_executable_hooks:10:in `<main>'
9: from /Users/myuser/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/executable-hooks-1.6.0/lib/executable-hooks/hooks.rb:49:in `run'
8: from /Users/myuser/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/executable-hooks-1.6.0/lib/executable-hooks/hooks.rb:49:in `each'
7: from /Users/myuser/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/executable-hooks-1.6.0/lib/executable-hooks/hooks.rb:50:in `block in run'
6: from /Users/myuser/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/rubygems-bundler-1.4.5/lib/rubygems_executable_plugin.rb:4:in `block in <top (required)>'
5: from /Users/myuser/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:156:in `require'
4: from /Users/myuser/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:168:in `rescue in require'
3: from /Users/myuser/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:168:in `require'
2: from /Users/myuser/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/rubygems-bundler-1.4.5/lib/rubygems-bundler/noexec.rb:131:in `<top (required)>'
1: from /Users/myuser/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/rubygems-bundler-1.4.5/lib/rubygems-bundler/noexec.rb:124:in `check'
/Users/myuser/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/rubygems-bundler-1.4.5/lib/rubygems-bundler/noexec.rb:84:in `setup': undefined method `plain_specs' for #<Bundler::RubygemsIntegration:0x00007f90bf0cb3e8> (NoMethodError)
Looking into the situation, the readme has this to say:
Generally, this gem is not needed on RubyGems >= 2.2.0.
The solution was to remove that gem from the #global gemset:
rvm #global
gem uninstall rubygems-bundler

rake assets:precompile not working always showing : read': No such file or directory - assets:precompile:all

I am using ubuntu 64-bit machine using, rvm, ruby 1.9.3-p448 , rails 3.2.13
And am not able to precompile assets.
I used following commands but got same error always :-
rake assets:precompile RAILS_ENV=production
rake assets:precompile
bundle exec rake assets:precompile
mymachine:~/mymachine-rails/prod$ bundle exec rake assets:precompile --trace
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails
4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See
the release notes for more on this:
http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released.
(called from at
/home/mymachine/mymachine-rails/prod/Rakefile:7)
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails
4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See
the release notes for more on this:
http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released.
(called from at
/home/mymachine/mymachine-rails/prod/Rakefile:7)
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails
4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See
the release notes for more on this:
http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released.
(called from at
/home/mymachine/mymachine-rails/prod/Rakefile:7)
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails
4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See
the release notes for more on this:
http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released.
(called from at
/home/mymachine/mymachine-rails/prod/Rakefile:7)
** Invoke assets:precompile (first_time)
** Execute assets:precompile
/home/mymachine/.rvm/rubies/ruby-1.9.3-p448/bin/ruby /home/mymachine/.rvm/gems/ruby-1.9.3-p448#mymachine/bin/ruby_executable_hooks
assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace
/home/mymachine/.rvm/gems/ruby-1.9.3-p448#mymachine/bin/ruby_executable_hooks:14:in
read': No such file or directory - assets:precompile:all
(Errno::ENOENT)
from /home/mymachine/.rvm/gems/ruby-1.9.3-p448#mymachine/bin/ruby_executable_hooks:14:in
'
rake aborted!
Command failed with status (1): [/home/mymachine/.rvm/rubies/ruby-1.9.3-p448/...]
/home/mymachine/.rvm/gems/ruby-1.9.3-p448#mymachine/gems/rake-10.1.0/lib/rake/file_utils.rb:55:in
block in create_shell_runner'
/home/mymachine/.rvm/gems/ruby-1.9.3-p448#mymachine/gems/rake-10.1.0/lib/rake/file_utils.rb:45:in
call'
/home/mymachine/.rvm/gems/ruby-1.9.3-p448#mymachine/gems/rake-10.1.0/lib/rake/file_utils.rb:45:in
sh'
/home/mymachine/.rvm/gems/ruby-1.9.3-p448#mymachine/gems/rake-10.1.0/lib/rake/file_utils_ext.rb:37:insh'
/home/mymachine/.rvm/gems/ruby-1.9.3-p448#mymachine/gems/rake-10.1.0/lib/rake/file_utils.rb:82:in
ruby'
/home/mymachine/.rvm/gems/ruby-1.9.3-p448#mymachine/gems/rake-10.1.0/lib/rake/file_utils_ext.rb:37:inruby'
/home/mymachine/.rvm/gems/ruby-1.9.3-p448#mymachine/gems/actionpack-3.2.13/lib/sprockets/assets.rake:12:in ruby_rake_task'
/home/mymachine/.rvm/gems/ruby-1.9.3-p448#mymachine/gems/actionpack-3.2.13/lib/sprockets/assets.rake:21:ininvoke_or_reboot_rake_task'
/home/mymachine/.rvm/gems/ruby-1.9.3-p448#mymachine/gems/actionpack-3.2.13/lib/sprockets/assets.rake:29:in block (2 levels) in <top (required)>'
/home/mymachine/.rvm/gems/ruby-1.9.3-p448#mymachine/gems/rake-10.1.0/lib/rake/task.rb:236:in
call'
/home/mymachine/.rvm/gems/ruby-1.9.3-p448#mymachine/gems/rake-10.1.0/lib/rake/task.rb:236:in
block in execute'
/home/mymachine/.rvm/gems/ruby-1.9.3-p448#mymachine/gems/rake-10.1.0/lib/rake/task.rb:231:in
each'
/home/mymachine/.rvm/gems/ruby-1.9.3-p448#mymachine/gems/rake-10.1.0/lib/rake/task.rb:231:in
execute'
/home/mymachine/.rvm/gems/ruby-1.9.3-p448#mymachine/gems/rake-10.1.0/lib/rake/task.rb:175:in
block in invoke_with_call_chain'
/home/mymachine/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/monitor.rb:211:in
mon_synchronize'
/home/mymachine/.rvm/gems/ruby-1.9.3-p448#mymachine/gems/rake-10.1.0/lib/rake/task.rb:168:in
invoke_with_call_chain'
/home/mymachine/.rvm/gems/ruby-1.9.3-p448#mymachine/gems/rake-10.1.0/lib/rake/task.rb:161:in
invoke'
/home/mymachine/.rvm/gems/ruby-1.9.3-p448#mymachine/gems/rake-10.1.0/lib/rake/application.rb:149:in
invoke_task'
/home/mymachine/.rvm/gems/ruby-1.9.3-p448#mymachine/gems/rake-10.1.0/lib/rake/application.rb:106:in
block (2 levels) in top_level'
/home/mymachine/.rvm/gems/ruby-1.9.3-p448#mymachine/gems/rake-10.1.0/lib/rake/application.rb:106:in
each'
/home/mymachine/.rvm/gems/ruby-1.9.3-p448#mymachine/gems/rake-10.1.0/lib/rake/application.rb:106:in
block in top_level'
/home/mymachine/.rvm/gems/ruby-1.9.3-p448#mymachine/gems/rake-10.1.0/lib/rake/application.rb:115:in
run_with_threads'
/home/mymachine/.rvm/gems/ruby-1.9.3-p448#mymachine/gems/rake-10.1.0/lib/rake/application.rb:100:in
top_level'
/home/mymachine/.rvm/gems/ruby-1.9.3-p448#mymachine/gems/rake-10.1.0/lib/rake/application.rb:78:in
block in run'
/home/mymachine/.rvm/gems/ruby-1.9.3-p448#mymachine/gems/rake-10.1.0/lib/rake/application.rb:165:in
standard_exception_handling'
/home/mymachine/.rvm/gems/ruby-1.9.3-p448#mymachine/gems/rake-10.1.0/lib/rake/application.rb:75:in
run'
/home/mymachine/.rvm/gems/ruby-1.9.3-p448#mymachine/gems/rake-10.1.0/bin/rake:33:in
<top (required)>'
/home/mymachine/.rvm/gems/ruby-1.9.3-p448#mymachine/bin/rake:19:inload'
/home/mymachine/.rvm/gems/ruby-1.9.3-p448#mymachine/bin/rake:19:in <main>'
/home/mymachine/.rvm/gems/ruby-1.9.3-p448#mymachine/bin/ruby_executable_hooks:14:in
eval'
/home/mymachine/.rvm/gems/ruby-1.9.3-p448#mymachine/bin/ruby_executable_hooks:14:in
`'
Tasks: TOP => assets:precompile
Gems List :-
*** LOCAL GEMS ***
actionmailer (3.2.13)
actionpack (3.2.13)
activemodel (3.2.13)
activerecord (3.2.13)
activeresource (3.2.13)
activesupport (3.2.13)
acts-as-taggable-on (2.4.1)
acts_as_paranoid (0.4.2)
angularjs-rails (1.0.7)
arel (3.0.2)
bcrypt-ruby (3.1.1)
browser (0.2.0)
builder (3.0.4)
bundler (1.3.5)
bundler-unload (1.0.2)
cancan (1.6.10)
chronic (0.9.1)
climate_control (0.0.3)
cocaine (0.5.1)
coffee-rails (3.2.2)
coffee-script (2.2.0)
coffee-script-source (1.6.3)
columnize (0.3.6)
commonjs (0.2.6)
couchrest (1.1.3)
couchrest_model (1.1.2)
daemons (1.1.9)
debugger (1.6.1)
debugger-linecache (1.2.0)
debugger-ruby_core_source (1.2.3)
devise (3.0.0)
em-synchrony (1.0.3)
erubis (2.7.0)
eventmachine (1.0.3)
execjs (1.4.0)
executable-hooks (1.2.2)
faraday (0.8.7)
faye-websocket (0.6.2)
hashie (2.0.5)
hike (1.2.3)
hiredis (0.4.5)
httpauth (0.2.0)
i18n (0.6.1)
journey (1.0.4)
jquery-rails (3.0.4)
jquery-ui-rails (4.0.4)
json (1.7.7)
jwt (0.1.8)
less (2.3.2)
less-rails (2.3.3)
libv8 (3.16.14.3 x86_64-linux, 3.11.8.17 x86_64-linux)
localtunnel (0.3)
magic_multi_connections (1.2.1)
mail (2.5.4)
masonry-rails (0.2.0)
mime-types (1.23)
mini_portile (0.5.1)
multi_json (1.7.7)
multipart-post (1.2.0)
mysql2 (0.3.13)
net-ssh (2.6.8)
net-ssh-gateway (1.2.0)
nokogiri (1.6.0)
oauth (0.4.7)
oauth2 (0.8.1)
omniauth (1.1.4)
omniauth-facebook (1.4.1)
omniauth-google-oauth2 (0.2.0)
omniauth-linkedin-oauth2 (0.0.2)
omniauth-oauth (1.0.1)
omniauth-oauth2 (1.1.1)
omniauth-twitter (1.0.0)
orm_adapter (0.4.0)
paperclip (3.5.0)
polyglot (0.3.3)
rack (1.4.5)
rack-cache (1.2)
rack-offline (0.6.4)
rack-ssl (1.3.3)
rack-test (0.6.2)
rails (3.2.13)
railties (3.2.13)
rake (10.1.0)
rb-readline (0.4.2)
rdoc (3.12.2)
redis (3.0.4)
ref (1.0.5)
rest-client (1.6.7)
rsolr (1.0.9)
rubygems-bundler (1.3.2)
rvm (1.11.3.8)
sass (3.2.9)
sass-rails (3.2.6)
sprockets (2.2.2)
swipe-rails (0.0.5)
therubyracer (0.12.0, 0.11.4)
thin (1.5.1)
thor (0.18.1)
tilt (1.4.1)
time_diff (0.3.0)
treetop (1.4.14)
twitter-bootstrap-rails (2.2.7)
tzinfo (0.3.37)
uglifier (2.1.2)
warden (1.2.3)
websocket-driver (0.2.1)
websocket-rails (0.4.9)
whenever (0.8.4)
will_paginate (3.0.4)
Seems to be an RVM quirk. I ran into this using rvm + ruby 2.0.0-p247 and this worked for me:
rvm ruby-2.0.0-p247#global do gem install executable-hooks

rails g mongoid config error

Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
Master:blog shaunstanislaus$ bundle update
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Enter your password to install the bundled RubyGems to your system:
Using rake (0.9.2.2)
Enter your password to install the bundled RubyGems to your system:
Using i18n (0.6.0)
Using multi_json (1.3.6)
Using activesupport (3.2.6)
Using builder (3.0.0)
Using activemodel (3.2.6)
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.1)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.1.3)
Using actionpack (3.2.6)
Using mime-types (1.19)
Using polyglot (0.3.3)
Using treetop (1.4.10)
Using mail (2.4.4)
Using actionmailer (3.2.6)
Using arel (3.0.2)
Using tzinfo (0.3.33)
Using activerecord (3.2.6)
Using activeresource (3.2.6)
Using bson (1.6.4)
Using bson_ext (1.6.4)
Using bundler (1.1.5)
Using coffee-script-source (1.3.3)
Using execjs (1.4.0)
Using coffee-script (2.2.0)
Using rack-ssl (1.3.2)
Using json (1.7.4)
Using rdoc (3.12)
Using thor (0.15.4)
Using railties (3.2.6)
Using coffee-rails (3.2.2)
Using jquery-rails (2.0.2)
Using mongo (1.0.9)
Using will_paginate (3.0.3)
Using mongoid (2.0.0.beta.19)
Using rails (3.2.6)
Using sass (3.1.20)
Using sass-rails (3.2.5)
Using sqlite3 (1.3.6)
Using uglifier (1.2.7)
Your bundle is updated! Use `bundle show [gemname]` to see where a bundled gem is installed.
Master:blog shaunstanislaus$ rails g mongoid:config
/Library/Ruby/Gems/1.8/gems/railties-3.2.6/lib/rails/railtie/configuration.rb:85:in
method_missing': undefined methodgenerators' for #
(NoMethodError)
from /Library/Ruby/Gems/1.8/gems/mongoid-2.0.0.beta.19/lib/mongoid/railtie.rb:13
from /Library/Ruby/Gems/1.8/gems/mongoid-2.0.0.beta.19/lib/mongoid.rb:89:in
require'
from /Library/Ruby/Gems/1.8/gems/mongoid-2.0.0.beta.19/lib/mongoid.rb:89
from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:68:in
require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:68:in
require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:66:in
each'
from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:66:in
require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:55:in
each'
from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:55:in
require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler.rb:119:in
require'
from /Users/shaunstanislaus/Desktop/code/blog/config/application.rb:7
from /Library/Ruby/Gems/1.8/gems/railties-3.2.6/lib/rails/commands.rb:24:in
require'
from /Library/Ruby/Gems/1.8/gems/railties-3.2.6/lib/rails/commands.rb:24
from script/rails:6:inrequire'
from script/rails:6
how do i fix this?
i entered this command and error appears above.
Master:blog shaunstanislaus$ rails g mongoid:config
I have done trying to remove gemfile.loc
bundle install
rails g mongoid:config, came out this error again. still the same.
Master:blog shaunstanislaus$ rails g mongoid:config
/Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:68:in require': /Library/Ruby/Gems/1.8/gems/mongoid-3.0.3/lib/mongoid.rb:148: odd number list for Hash (SyntaxError)
{ to: Config }))
^
/Library/Ruby/Gems/1.8/gems/mongoid-3.0.3/lib/mongoid.rb:148: syntax error, unexpected ':', expecting '}'
{ to: Config }))
^
from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:68:inrequire'
from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:66:in each'
from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:66:inrequire'
from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:55:in each'
from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler/runtime.rb:55:inrequire'
from /Library/Ruby/Gems/1.8/gems/bundler-1.1.5/lib/bundler.rb:119:in require'
from /Users/shaunstanislaus/Desktop/code/blog/config/application.rb:7
from /Library/Ruby/Gems/1.8/gems/railties-3.2.6/lib/rails/commands.rb:24:inrequire'
from /Library/Ruby/Gems/1.8/gems/railties-3.2.6/lib/rails/commands.rb:24
from script/rails:6:in `require'
from script/rails:6
Remove your GemFile.lock, run bundle install. If you're running on the latest version of Rails (3.2?) and Ruby (1.9.3-p###) it should work.
The reason the "generator" commands for Mongoid isn't showing is most likely that the gem didn't install properly for the version of rails and ruby you have.
Check this out: Rails g failing for mongoid commands… – Dominic Tancredi 2
I have this set up
ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin12.0.0]
bundle -v
Bundler version 1.1.5
bundle install succeeds; rake server still gives the error
/Users/avaranovich/.gem/gems/bundler-1.1.5/lib/bundler/runtime.rb:68:in `require': /Users/avaranovich/.gem/gems/mongoid-3.0.4/lib/mongoid.rb:148: odd number list for Hash (SyntaxError)
{ to: Config }))
I fixed this with typing bundle exec rails g mongoid:config

how to make rails 3.0 default on mac?

Here are my gems when I type in gem list in the terminal:
* LOCAL GEMS *
abstract (1.0.0)
actionmailer (3.0.10)
actionpack (3.0.10)
activemodel (3.0.10)
activerecord (3.0.10)
activeresource (3.0.10)
activesupport (3.0.10)
arel (2.0.10)
builder (2.1.2)
bundler (1.0.18)
erubis (2.6.6)
i18n (0.5.0)
mail (2.2.19)
mime-types (1.16)
minitest (1.6.0)
mysql2 (0.3.7)
polyglot (0.3.2)
rack (1.2.3)
rack-mount (0.6.14)
rack-test (0.5.7)
rails (3.0.10)
railties (3.0.10)
rake (0.8.7)
rdoc (3.9.3, 2.5.8)
rubygems-update (1.8.9)
thor (0.14.6)
treetop (1.4.10)
tzinfo (0.3.29)
Ruby -v: ruby 1.9.2
How come when I type rails -v it gives me: Rails 1.2.6? I need the 3.0 to be the default.
Try running:
gem uninstall rails -v 1.2.6
and see if that works. You can also look into RVM there is a RailsCast http://railscasts.com/episodes/200-rails-3-beta-and-rvm
It also may be necissary to use sudo on a mac like so:
sudo gem uninstall rails

Ruby on Rails - linecache error while trying to ' bundle install '

Hi I'm trying to run bundle install on my windows machine it runs fine until it reaches the linecache and then spits out a huge error:
Fetching source index for http://rubygems.org/
Using rake (0.8.7)
Using abstract (1.0.0)
Using activesupport (3.0.3)
Using builder (2.1.2)
Using i18n (0.5.0)
Using activemodel (3.0.3)
Using erubis (2.6.6)
Using rack (1.2.2)
Using rack-mount (0.6.14)
Using rack-test (0.5.7)
Using tzinfo (0.3.26)
Using actionpack (3.0.3)
Using mime-types (1.16)
Using polyglot (0.3.1)
Using treetop (1.4.9)
Using mail (2.2.17)
Using actionmailer (3.0.3)
Using arel (2.0.9)
Using activerecord (3.0.3)
Using activeresource (3.0.3)
Using bundler (1.0.12)
Using thor (0.14.6)
Using railties (3.0.3)
Using rails (3.0.3)
Using render_component_vho (3.0.3)
Using verification (1.0.1)
Using active_scaffold_vho (3.0.19)
Using columnize (0.3.2)
Installing linecache (0.43) with native extensions C:/Ruby192/lib/ruby/site_ruby
/1.9.1/rubygems/installer.rb:533:in `rescue in block in build_extensions': ERROR
: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
C:/Ruby192/bin/ruby.exe extconf.rb
Can't handle 1.9.x yet
*** 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=C:/Ruby192/bin/ruby
Gem files will remain installed in C:/Ruby192/lib/ruby/gems/1.9.1/gems/linecache
-0.43 for inspection.
Results logged to C:/Ruby192/lib/ruby/gems/1.9.1/gems/linecache-0.43/ext/gem_mak
e.out
from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:511:in `b
lock in build_extensions'
from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:486:in `e
ach'
from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:486:in `b
uild_extensions'
from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:159:in `i
nstall'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/sour
ce.rb:96:in `install'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/inst
aller.rb:55:in `block in run'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/spec
_set.rb:12:in `block in each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/spec
_set.rb:12:in `each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/spec
_set.rb:12:in `each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/inst
aller.rb:44:in `run'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/inst
aller.rb:8:in `install'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/cli.
rb:225:in `install'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/vend
or/thor/task.rb:22:in `run'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/vend
or/thor/invocation.rb:118:in `invoke_task'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/vend
or/thor.rb:246:in `dispatch'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/vend
or/thor/base.rb:389:in `start'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/bin/bundle:13:in
`<top (required)>'
from C:/Ruby192/bin/bundle:19:in `load'
from C:/Ruby192/bin/bundle:19:in `<main>'
I've tried googling for the problem and found two posts that explain the problem that I have first is a Stackoveflow Post which is pretty close to what I've got, but upon further inspection I found that the solution given in that post was not what I needed
another is this post that seems to discuss the exact problem that I have but doesn't give a solution anyone have any idea what I should do??
Ruby Version => 1.9.2
Rails Version => oh come on it doesn't even tell rails version it just prints out another error
Could not find linecache-0.43 in any of the sources
Try running `bundle install`.
any ideas what I'm doing wrong?? any help would be immensely appreciated
You should try installing linecache19 instead of linecache. The gem you are trying to install is incompatible with Ruby version 1.9.2.
This is also suggested by the error message:
Can't handle 1.9.x yet
"debugger" gems has worked more flawless for me lately.
I switched from ruby-debug19 to debugger which installs the dependencies without any hassle.
1.9.2-p136 + RVM. Worked using ruby-debug19 which installs linecache19 as a dependency:
gem install ruby-debug19 -- --with-ruby-include=$rvm_path/src/ruby-1.9.2-p136/