I am completely newbie to this rails frame work and learning via online tutorials. I am in the process of developing a simple application with the help of rails(rails+Mysql).
Currently i am facing an issue with "rake" command.
When i tried to "rake db:schema:dump" the following errors are coming.Pls suggest me some thing.
Thanks in advance.
harsha@Trebuchet:~/simp_cms$ rake db:schema:dump --trace
rake aborted!
LoadError: cannot load such file -- bundler/setup
/home/harsha/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/home/harsha/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/home/harsha/simp_cms/config/boot.rb:3:in `<top (required)>'
/home/harsha/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/home/harsha/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/home/harsha/simp_cms/config/application.rb:1:in `<top (required)>'
/home/harsha/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/home/harsha/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/home/harsha/simp_cms/Rakefile:4:in `<top (required)>'
/home/harsha/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/rake_module.rb:28:in `load'
/home/harsha/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/rake_module.rb:28:in `load_rakefile'
/home/harsha/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/application.rb:689:in `raw_load_rakefile'
/home/harsha/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/application.rb:94:in `block in load_rakefile'
/home/harsha/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/application.rb:176:in `standard_exception_handling'
/home/harsha/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/application.rb:93:in `load_rakefile'
/home/harsha/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/application.rb:77:in `block in run'
/home/harsha/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/application.rb:176:in `standard_exception_handling'
/home/harsha/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/application.rb:75:in `run'
/home/harsha/.rbenv/versions/2.2.2/bin/rake:33:in `<main>'
harsha@Trebuchet:~/simp_cms$ bundle exec rake db:schema:dump --trace
/var/lib/gems/1.9.1/gems/bundler-1.10.5/lib/bundler/shared_helpers.rb:78: warning: Insecure world writable dir /usr in PATH, mode 040777
Could not find debugger-1.6.8 in any of the sources
Run `bundle install` to install missing gems.
harsha@Trebuchet:~/simp_cms$ gem install debugger -v 1.6.8
Building native extensions. This could take a while...
/home/harsha/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/ext/builder.rb:73: warning: Insecure world writable dir /usr in PATH, mode 040777
ERROR: Error installing debugger:
ERROR: Failed to build gem native extension.
/home/harsha/.rbenv/versions/2.2.2/bin/ruby -r ./siteconf20150628-11403-1nydzd5.rb extconf.rb
*** 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.
My Ruby version, rails version and gem list
harsha@Trebuchet:~$ rails -v
Rails 4.2.2
harsha@Trebuchet:~$ rails -v
Rails 4.2.2
harsha@Trebuchet:~$ gem list
*** LOCAL GEMS ***
actionmailer (4.2.2)
actionpack (4.2.2)
actionview (4.2.2)
activejob (4.2.2)
activemodel (4.2.2)
activerecord (4.2.2)
activesupport (4.2.2)
arel (6.0.0)
bigdecimal (1.2.7, 1.2.6)
binding_of_caller (0.7.2)
builder (3.2.2)
columnize (0.9.0)
debug_inspector (0.0.2)
debugger-linecache (1.2.0)
debugger-ruby_core_source (1.3.8)
erubis (2.7.0)
globalid (0.3.5)
i18n (0.7.0)
io-console (0.4.3)
json (1.8.3, 1.8.1)
loofah (2.0.2)
mail (2.6.3)
mime-types (2.6.1)
mini_portile (0.6.2)
minitest (5.7.0, 5.4.3)
mysql2 (0.3.18)
nokogiri (1.6.6.2)
power_assert (0.2.3, 0.2.2)
psych (2.0.13, 2.0.8)
rack (1.6.4)
rack-test (0.6.3)
rails-deprecated_sanitizer (1.0.3)
rails-dom-testing (1.0.6)
rails-html-sanitizer (1.0.2)
rake (10.4.2)
rdoc (4.2.0)
spring (1.3.6)
test-unit (3.1.2, 3.0.8)
thread_safe (0.3.5)
tzinfo (1.2.2)
Please find my database.yml file
default: &default
adapter: mysql2
encoding: utf8
pool: 5
username: simp_cms
password: secretpassword
socket: /tmp/mysql.sock
development:
<<: *default
database: simp_cms_development
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
<<: *default
database: simp_cms_test
please feel free to contact me for any more details...
Update 1: installed bundler and ran "bundle install"
harsha@Trebuchet:~/simp_cms$ gem install bundler
Successfully installed bundler-1.10.5
Parsing documentation for bundler-1.10.5
Done installing documentation for bundler after 5 seconds
1 gem installed
harsha@Trebuchet:~/simp_cms$ gem list
*** LOCAL GEMS ***
actionmailer (4.2.2)
actionpack (4.2.2)
actionview (4.2.2)
activejob (4.2.2)
activemodel (4.2.2)
activerecord (4.2.2)
activesupport (4.2.2)
arel (6.0.0)
bigdecimal (1.2.7, 1.2.6)
binding_of_caller (0.7.2)
builder (3.2.2)
bundler (1.10.5)
columnize (0.9.0)
debug_inspector (0.0.2)
debugger-linecache (1.2.0)
debugger-ruby_core_source (1.3.8)
erubis (2.7.0)
globalid (0.3.5)
i18n (0.7.0)
io-console (0.4.3)
json (1.8.3, 1.8.1)
loofah (2.0.2)
mail (2.6.3)
mime-types (2.6.1)
mini_portile (0.6.2)
minitest (5.7.0, 5.4.3)
mysql2 (0.3.18)
nokogiri (1.6.6.2)
power_assert (0.2.3, 0.2.2)
psych (2.0.13, 2.0.8)
rack (1.6.4)
rack-test (0.6.3)
rails-deprecated_sanitizer (1.0.3)
rails-dom-testing (1.0.6)
rails-html-sanitizer (1.0.2)
rake (10.4.2)
rdoc (4.2.0)
spring (1.3.6)
test-unit (3.1.2, 3.0.8)
thread_safe (0.3.5)
tzinfo (1.2.2)
harsha@Trebuchet:~/simp_cms$ bundle install
Using rake 10.4.2
/var/lib/gems/1.9.1/gems/bundler-1.10.5/lib/bundler.rb:315: warning: Insecure world writable dir /usr in PATH, mode 040777
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.7.0
Using thread_safe 0.3.5
Using tzinfo 1.2.2
Using activesupport 4.2.2
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile 0.6.2
Using nokogiri 1.6.6.2
Using rails-deprecated_sanitizer 1.0.3
Using rails-dom-testing 1.0.6
Using loofah 2.0.2
Using rails-html-sanitizer 1.0.2
Using actionview 4.2.2
Using rack 1.6.4
Using rack-test 0.6.3
Using actionpack 4.2.2
Using globalid 0.3.5
Using activejob 4.2.2
Using mime-types 2.6.1
Using mail 2.6.3
Using actionmailer 4.2.2
Using activemodel 4.2.2
Using arel 6.0.0
Using activerecord 4.2.2
Using debug_inspector 0.0.2
Using binding_of_caller 0.7.2
Using columnize 0.9.0
Using debugger-linecache 1.2.0
Using debugger-ruby_core_source 1.3.8
Using debugger 1.6.8
Using mysql2 0.3.18
Using bundler 1.10.5
Using thor 0.19.1
Using railties 4.2.2
Using sprockets 3.2.0
Using sprockets-rails 2.3.2
Using rails 4.2.2
Using rdoc 4.2.0
Using sdoc 0.4.1
Using spring 1.3.6
Using web-console 2.1.3
Bundle complete! 6 Gemfile dependencies, 44 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
harsha@Trebuchet:~/simp_cms$
Now when i tried to use rake command.the below error is coming
harsha@Trebuchet:~/simp_cms$ bundle exec rake
/var/lib/gems/1.9.1/gems/bundler-1.10.5/lib/bundler/shared_helpers.rb:78: warning: Insecure world writable dir /usr in PATH, mode 040777
Could not find debugger-1.6.8 in any of the sources
Run `bundle install` to install missing gems.
harsha@Trebuchet:~/simp_cms$ gem install debugger -v 1.6.8
Building native extensions. This could take a while...
/home/harsha/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/ext/builder.rb:73: warning: Insecure world writable dir /usr in PATH, mode 040777
ERROR: Error installing debugger:
ERROR: Failed to build gem native extension.
/home/harsha/.rbenv/versions/2.2.2/bin/ruby -r ./siteconf20150628-3517-1lyt1uy.rb extconf.rb
*** 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=/home/harsha/.rbenv/versions/2.2.2/bin/$(RUBY_BASE_NAME)
/home/harsha/.rbenv/versions/2.2.2/lib/ruby/2.2.0/fileutils.rb:1391:in `initialize': No such file or directory @ rb_sysopen - ./222/ruby_debug.h (Errno::ENOENT)
from /home/harsha/.rbenv/versions/2.2.2/lib/ruby/2.2.0/fileutils.rb:1391:in `open'
from /home/harsha/.rbenv/versions/2.2.2/lib/ruby/2.2.0/fileutils.rb:1391:in `copy_file'
from /home/harsha/.rbenv/versions/2.2.2/lib/ruby/2.2.0/fileutils.rb:485:in `copy_file'
from /home/harsha/.rbenv/versions/2.2.2/lib/ruby/2.2.0/fileutils.rb:402:in `block in cp'
from /home/harsha/.rbenv/versions/2.2.2/lib/ruby/2.2.0/fileutils.rb:1570:in `block in fu_each_src_dest'
from /home/harsha/.rbenv/versions/2.2.2/lib/ruby/2.2.0/fileutils.rb:1584:in `fu_each_src_dest0'
from /home/harsha/.rbenv/versions/2.2.2/lib/ruby/2.2.0/fileutils.rb:1568:in `fu_each_src_dest'
from /home/harsha/.rbenv/versions/2.2.2/lib/ruby/2.2.0/fileutils.rb:401:in `cp'
from extconf.rb:83:in `block in <main>'
from extconf.rb:82:in `each'
from extconf.rb:82:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in /home/harsha/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/debugger-1.6.8 for inspection.
Results logged to /home/harsha/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/extensions/x86_64-linux/2.2.0-static/debugger-1.6.8/gem_make.out
harsha@Trebuchet:~/simp_cms$
it seems debugger gem is having some issues but not sure what they are
found the problem :: "debugger" gem is not compatible with ruby 2.x versions.
Hence commented debugger in gem file and ran "rbenv rehash" "bundle install" ...Thats all issue resolved.