I had recently followed multiple blogs to completely wipe out rvm, rails and then reinstalled ruby 2.3.0 and rails 5. Made and app using it no issues. But the moment I opened a new terminal window in my machine it was not recognising rails at all as if it was only installed in that particular terminal.
So I just completed my work in that single terminal. Now when I restarted my laptop, I am unable to run the same app. I do not wish to reinstall everything again as I am sure this is a small configuration problem. Why is this happening?
The error message that I am getting now:
/Users/sahil/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/dependency.rb:319:in `to_specs': Could not find 'railties' (>= 0.a) among 30 total gem(s) (Gem::LoadError)
Checked in 'GEM_PATH=/Users/sahil/.rvm/gems/ruby-2.3.1:/Users/sahil/.rvm/gems/ruby-2.3.1#global', execute `gem env` for more information
from /Users/sahil/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/dependency.rb:328:in `to_spec'
from /Users/sahil/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_gem.rb:65:in `gem'
from /Users/sahil/.rbenv/versions/2.3.1/bin/rails:22:in `<main>'
I have already seen other similar questions where they ask to reinstall everything again which I do not want to do as it worked after installing but did not work on system restart.
Now I did gem install rails in one terminal and the app is working again, but if I try to open a new terminal and give the same command rails s, it gives me this error,
Ignoring byebug-9.0.5 because its extensions are not built. Try: gem pristine byebug --version 9.0.5
Ignoring debug_inspector-0.0.2 because its extensions are not built. Try: gem pristine debug_inspector --version 0.0.2
Ignoring nokogiri-1.6.8 because its extensions are not built. Try: gem pristine nokogiri --version 1.6.8
Ignoring byebug-9.0.5 because its extensions are not built. Try: gem pristine byebug --version 9.0.5
Ignoring debug_inspector-0.0.2 because its extensions are not built. Try: gem pristine debug_inspector --version 0.0.2
/Users/sahil/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': incompatible library version - /Users/sahil/.rvm/gems/ruby-2.3.1#global/gems/io-console-0.4.6/lib/io/console.bundle (fatal)
from /Users/sahil/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/sahil/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/user_interaction.rb:9:in `<top (required)>'
from /Users/sahil/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/sahil/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/sahil/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/config_file.rb:8:in `<top (required)>'
from /Users/sahil/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/sahil/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/sahil/.rvm/gems/ruby-2.3.1#global/gems/bundler-1.12.5/lib/bundler/rubygems_integration.rb:4:in `<top (required)>'
from /Users/sahil/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/sahil/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/sahil/.rvm/gems/ruby-2.3.1#global/gems/bundler-1.12.5/lib/bundler/shared_helpers.rb:6:in `<top (required)>'
from /Users/sahil/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/sahil/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/sahil/.rvm/gems/ruby-2.3.1#global/gems/bundler-1.12.5/lib/bundler/setup.rb:2:in `<top (required)>'
from /Users/sahil/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `require'
from /Users/sahil/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `rescue in require'
from /Users/sahil/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in `require'
from /Users/sahil/Documents/work/Development/todoApp/config/boot.rb:3:in `<top (required)>'
from bin/rails:3:in `require_relative'
from bin/rails:3:in `<main>'
You mentioned that you reinstalled ruby 2.3.0 and Rails 5. However it seems rbenv is trying to load your project with ruby 2.3.1.
You should switch to ruby 2.3.0. I guess you should be able to do: rbenv local 2.3.0.
To avoid this from happening again though, you should add a .ruby-version dotfile to your project root and in the file only add 2.3.0.
Hope that works
am learning rails using this website http://tutorials.jumpstartlab.com/projects/blogger.html and whenever I try starting the server using rails server, I get this error on the terminal
Could not find gem 'sqlite3 (>= 0) ruby' in the gems available on this machine.
Run `bundle install` to install missing gems.
After running the command bundle install, I get the error:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/local/Cellar/ruby/2.1.2_3/bin/ruby extconf.rb
/Users/andrewmolo/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/executable-hooks-1.3.2/lib/executable-hooks/regenerate_binstubs_command.rb:71:in `initialize': Permission denied # rb_sysopen - /usr/local/Cellar/ruby/2.1.2_3/bin/rake (Errno::EACCES)
from /Users/UserX/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/executable-hooks-1.3.2/lib/executable-hooks/regenerate_binstubs_command.rb:71:in `open'
from /Users/UserX/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/executable-hooks-1.3.2/lib/executable-hooks/regenerate_binstubs_command.rb:71:in `block in try_to_fix_binstubs'
from /Users/UserX/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/executable-hooks-1.3.2/lib/executable-hooks/regenerate_binstubs_command.rb:69:in `map'
from /Users/UserX/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/executable-hooks-1.3.2/lib/executable-hooks/regenerate_binstubs_command.rb:69:in `try_to_fix_binstubs'
from /Users/UserX/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/executable-hooks-1.3.2/lib/executable-hooks/regenerate_binstubs_command.rb:46:in `block in execute_no_wrapper'
from /Users/UserX/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/executable-hooks-1.3.2/lib/executable-hooks/regenerate_binstubs_command.rb:44:in `each'
from /Users/UserX/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/executable-hooks-1.3.2/lib/executable-hooks/regenerate_binstubs_command.rb:44:in `execute_no_wrapper'
from extconf.rb:19:in `<main>'
bundler 1.9.1
erubis 2.7.0
executable-hooks 1.3.2
nokogiri 1.6.6.2
rack 1.6.0
railties 4.2.1
rake 10.1.0
extconf failed, exit code 1
Gem files will remain installed in /Users/UserX/.rvm/gems/ruby-2.2.0#global/gems/executable-hooks-1.3.2 for inspection.
Results logged to /Users/UserX/.rvm/gems/ruby-2.2.0#global/extensions/x86_64-darwin-13/2.1.0/executable-hooks-1.3.2/gem_make.out
/usr/local/Cellar/ruby/2.1.2_3/lib/ruby/2.1.0/rubygems/ext/builder.rb:89:in `run'
/usr/local/Cellar/ruby/2.1.2_3/lib/ruby/2.1.0/rubygems/ext/ext_conf_builder.rb:38:in `block in build'
/usr/local/Cellar/ruby/2.1.2_3/lib/ruby/2.1.0/tempfile.rb:324:in `open'
/usr/local/Cellar/ruby/2.1.2_3/lib/ruby/2.1.0/rubygems/ext/ext_conf_builder.rb:17:in `build'
/usr/local/Cellar/ruby/2.1.2_3/lib/ruby/2.1.0/rubygems/ext/builder.rb:161:in `block (2 levels) in build_extension'
/usr/local/Cellar/ruby/2.1.2_3/lib/ruby/2.1.0/rubygems/ext/builder.rb:160:in `chdir'
/usr/local/Cellar/ruby/2.1.2_3/lib/ruby/2.1.0/rubygems/ext/builder.rb:160:in `block in build_extension'
/usr/local/Cellar/ruby/2.1.2_3/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/usr/local/Cellar/ruby/2.1.2_3/lib/ruby/2.1.0/rubygems/ext/builder.rb:159:in `build_extension'
/usr/local/Cellar/ruby/2.1.2_3/lib/ruby/2.1.0/rubygems/ext/builder.rb:198:in `block in build_extensions'
/usr/local/Cellar/ruby/2.1.2_3/lib/ruby/2.1.0/rubygems/ext/builder.rb:195:in `each'
/usr/local/Cellar/ruby/2.1.2_3/lib/ruby/2.1.0/rubygems/ext/builder.rb:195:in `build_extensions'
/usr/local/Cellar/ruby/2.1.2_3/lib/ruby/2.1.0/rubygems/specification.rb:1436:in `block in build_extensions'
/usr/local/Cellar/ruby/2.1.2_3/lib/ruby/2.1.0/rubygems/user_interaction.rb:45:in `use_ui'
/usr/local/Cellar/ruby/2.1.2_3/lib/ruby/2.1.0/rubygems/specification.rb:1434:in `build_extensions'
/usr/local/Cellar/ruby/2.1.2_3/lib/ruby/2.1.0/rubygems/stub_specification.rb:60:in `build_extensions'
/usr/local/Cellar/ruby/2.1.2_3/lib/ruby/2.1.0/rubygems/basic_specification.rb:56:in `contains_requirable_file?'
/usr/local/Cellar/ruby/2.1.2_3/lib/ruby/2.1.0/rubygems/specification.rb:925:in `block in find_inactive_by_path'
/usr/local/Cellar/ruby/2.1.2_3/lib/ruby/2.1.0/rubygems/specification.rb:924:in `each'
/usr/local/Cellar/ruby/2.1.2_3/lib/ruby/2.1.0/rubygems/specification.rb:924:in `find'
/usr/local/Cellar/ruby/2.1.2_3/lib/ruby/2.1.0/rubygems/specification.rb:924:in `find_inactive_by_path'
/usr/local/Cellar/ruby/2.1.2_3/lib/ruby/2.1.0/rubygems.rb:185:in `try_activate'
/usr/local/Cellar/ruby/2.1.2_3/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:132:in `rescue in require'
/usr/local/Cellar/ruby/2.1.2_3/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144:in `require'
/Users/UserX/.rvm/gems/ruby-2.2.0#global/gems/bundler-1.9.1/lib/bundler/vendor/net/http/persistent.rb:12:in `<top (required)>'
/usr/local/Cellar/ruby/2.1.2_3/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/Cellar/ruby/2.1.2_3/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/Users/UserX/.rvm/gems/ruby-2.2.0#global/gems/bundler-1.9.1/lib/bundler/vendored_persistent.rb:11:in `<top (required)>'
/usr/local/Cellar/ruby/2.1.2_3/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/Cellar/ruby/2.1.2_3/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/Users/UserX/.rvm/gems/ruby-2.2.0#global/gems/bundler-1.9.1/lib/bundler/fetcher.rb:1:in `<top (required)>'
/Users/UserX/.rvm/gems/ruby-2.2.0#global/gems/bundler-1.9.1/lib/bundler/cli/install.rb:72:in `run'
/Users/UserX/.rvm/gems/ruby-2.2.0#global/gems/bundler-1.9.1/lib/bundler/cli.rb:157:in `install'
/Users/UserX/.rvm/gems/ruby-2.2.0#global/gems/bundler-1.9.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/Users/UserX/.rvm/gems/ruby-2.2.0#global/gems/bundler-1.9.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/Users/UserX/.rvm/gems/ruby-2.2.0#global/gems/bundler-1.9.1/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
/Users/UserX/.rvm/gems/ruby-2.2.0#global/gems/bundler-1.9.1/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
/Users/UserX/.rvm/gems/ruby-2.2.0#global/gems/bundler-1.9.1/lib/bundler/cli.rb:10:in `start'
/Users/UserX/.rvm/gems/ruby-2.2.0#global/gems/bundler-1.9.1/bin/bundle:20:in `block in <top (required)>'
/Users/UserX/.rvm/gems/ruby-2.2.0#global/gems/bundler-1.9.1/lib/bundler/friendly_errors.rb:7:in `with_friendly_errors'
/Users/UserX/.rvm/gems/ruby-2.2.0#global/gems/bundler-1.9.1/bin/bundle:18:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
Environment
Bundler 1.9.1
Rubygems 2.2.2
Ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0]
GEM_HOME /Users/andrewmolo/.rvm/gems/ruby-2.2.0
GEM_PATH /Users/andrewmolo/.rvm/gems/ruby-2.2.0:/Users/andrewmolo/.rvm/gems/ruby-2.2.0#global
RVM 1.26.10 (latest)
Git 1.8.5.2
rubygems-bundler (1.4.4)
OS = Mavericks 10.9.5
I don't know if this will help people with this issue but I was having the same error. What I ended up doing to fix it is commenting out the sqlite gem in my gemfile for the app. Granted I just did this a few minutes ago so I don't know if I'll run into any other issues but I use Postgres so if you use something else too, there shouldn't be an issue. Hope this helps others like me that were looking for answers.
Looks like bundler has no permission to write into your file system.
Permission denied # rb_sysopen - /usr/local/Cellar/ruby/2.1.2_3/bin/rake (Errno::EACCES)
Try running your command as sudo:
sudo bundle install
I believe the issue is the Gemfile.lock thats not allowing you to use the latest version of of each of your gems.
To update your Gemfile.lock run the command:
bundle update
in the same directory as your Gemfile.lock file then try bundle install again.
I'm having problem with the rails console. It gives me this error when I try installing the readline module using:
yum install readline-devel
I'm working with Rails 3.1.1 on a fedora 14 machine.
/home/led/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/irb/completion.rb:9:in `require': no such file to load -- readline (LoadError)
from /home/led/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/irb/completion.rb:9:in `<top (required)>'
from /home/led/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/commands/console.rb:3:in `require'
from /home/led/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/commands/console.rb:3:in `<top (required)>'
from /home/led/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/commands.rb:37:in `require'
from /home/led/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/commands.rb:37:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
ADDITION:
i tried installing readline via rvm following this link
[readline install via rvm][1]
and rails c worked but the problem is when reboot my system and tried again it appears to show this error
/usr/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:247:in `to_specs': Could not find rack (~> 1.2.1) amongst [ParseTree-3.0.5, RubyInline-3.8.4, ZenTest-4.3.3, abstract-1.0.0, actionmailer-3.0.5, actionpack-3.0.5, activemodel-3.0.5, activerecord-3.0.5, activeresource-3.0.5, activesupport-3.0.5, arel-2.0.9, builder-2.1.2, bundler-1.0.10, cgi_multipart_eof_fix-2.5.0, daemons-1.0.10, diff-lcs-1.1.2, erubis-2.6.6, fastthread-1.0.7, gem_plugin-0.2.3, git-1.2.5, i18n-0.6.0, i18n-0.5.0, json-1.4.6, mail-2.3.0, mime-types-1.17.2, mime-types-1.16, mongrel-1.1.5, mongrel_cluster-1.0.5, multimap-1.1.2, mysql-2.8.1, mysql2-0.3.7, polyglot-0.3.2, polyglot-0.3.1, rack-1.3.5, rack-1.1.0, rack-mount-0.8.3, rack-mount-0.6.13, rack-test-0.6.1, rack-test-0.5.4, rails-3.0.5, railties-3.0.5, rake-0.9.2.2, rake-0.9.2, regin-0.3.8, regin-0.3.7, rspec-core-2.6.4, rspec-expectations-2.6.0, rspec-mocks-2.6.0, ruby2ruby-1.2.4, ruby_parser-2.0.4, sexp_processor-3.0.4, sqlite3-1.3.3, text-format-1.0.0, thor-0.14.6, treetop-1.4.10, treetop-1.4.9, tzinfo-0.3.30, tzinfo-0.3.26] (Gem::LoadError)
from /usr/lib/ruby/site_ruby/1.8/rubygems/specification.rb:761:in `activate_dependencies'
from /usr/lib/ruby/site_ruby/1.8/rubygems/specification.rb:758:in `each'
from /usr/lib/ruby/site_ruby/1.8/rubygems/specification.rb:758:in `activate_dependencies'
from /usr/lib/ruby/site_ruby/1.8/rubygems/specification.rb:742:in `activate'
from /usr/lib/ruby/site_ruby/1.8/rubygems/specification.rb:764:in `activate_dependencies'
from /usr/lib/ruby/site_ruby/1.8/rubygems/specification.rb:758:in `each'
from /usr/lib/ruby/site_ruby/1.8/rubygems/specification.rb:758:in `activate_dependencies'
from /usr/lib/ruby/site_ruby/1.8/rubygems/specification.rb:742:in `activate'
from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:1211:in `gem'
from /usr/bin/rails:18
You need to install readline headers and libraries prior installing the Ruby interpreter (it is shown once you complete the installation of RVM)
You can see that again doing rvm notes
Check that the readline gem is installed. The above yum command installs the readline library, but to interact with it, you need the gem.
If it's not in your Gemfile, add it, run bundle install and check again.
I got an error when trying to run $rails console
/Library/Ruby/Gems/1.8/gems/mysql2-0.3.2/lib/mysql2/mysql2.bundle: dlopen(/Library/Ruby/Gems/1.8/gems/mysql2-0.3.2/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.16.dylib (LoadError)
Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.3.2/lib/mysql2/mysql2.bundle
Reason: image not found - /Library/Ruby/Gems/1.8/gems/mysql2-0.3.2/lib/mysql2/mysql2.bundle
from /Library/Ruby/Gems/1.8/gems/mysql2-0.3.2/lib/mysql2.rb:8
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:62:in `each'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:62:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:51:in `each'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:51:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler.rb:112:in `require'
from /Users/ccool2486/Sites/test3mysql/config/application.rb:7
from /Library/Ruby/Gems/1.8/gems/railties-3.0.6/lib/rails/commands.rb:21:in `require'
from /Library/Ruby/Gems/1.8/gems/railties-3.0.6/lib/rails/commands.rb:21
from script/rails:6:in `require'
from script/rails:6
ccool-2:test3mysql ccool2486$ rails console
WARNING: This version of mysql2 (0.3.2) doesn't ship with the ActiveRecord adapter bundled anymore as it's now part of Rails 3.1
WARNING: Please use the 0.2.x releases if you plan on using it in Rails <= 3.0.x
/Library/Ruby/Gems/1.8/gems/activerecord-3.0.6/lib/active_record/connection_adapters/abstract/connection_specification.rb:71:in `establish_connection': Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter` (no such file to load -- active_record/connection_adapters/mysql2_adapter) (RuntimeError)
from /Library/Ruby/Gems/1.8/gems/activerecord-3.0.6/lib/active_record/connection_adapters/abstract/connection_specification.rb:60:in `establish_connection'
from /Library/Ruby/Gems/1.8/gems/activerecord-3.0.6/lib/active_record/connection_adapters/abstract/connection_specification.rb:55:in `establish_connection'
from /Library/Ruby/Gems/1.8/gems/activerecord-3.0.6/lib/active_record/railtie.rb:59
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.6/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.6/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.6/lib/active_support/lazy_load_hooks.rb:43:in `run_load_hooks'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.6/lib/active_support/lazy_load_hooks.rb:42:in `each'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.6/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
from /Library/Ruby/Gems/1.8/gems/activerecord-3.0.6/lib/active_record/base.rb:1903
from /Library/Ruby/Gems/1.8/gems/activerecord-3.0.6/lib/active_record/railtie.rb:32
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.6/lib/active_support/dependencies.rb:239:in `call'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.6/lib/active_support/dependencies.rb:239:in `to_proc'
from /Library/Ruby/Gems/1.8/gems/railties-3.0.6/lib/rails/railtie.rb:180:in `each'
from /Library/Ruby/Gems/1.8/gems/railties-3.0.6/lib/rails/railtie.rb:180:in `load_console'
from /Library/Ruby/Gems/1.8/gems/railties-3.0.6/lib/rails/application.rb:154:in `load_console'
from /Library/Ruby/Gems/1.8/gems/railties-3.0.6/lib/rails/application/railties.rb:11:in `each'
from /Library/Ruby/Gems/1.8/gems/railties-3.0.6/lib/rails/application/railties.rb:11:in `all'
from /Library/Ruby/Gems/1.8/gems/railties-3.0.6/lib/rails/application.rb:154:in `load_console'
from /Library/Ruby/Gems/1.8/gems/railties-3.0.6/lib/rails/commands/console.rb:26:in `start'
from /Library/Ruby/Gems/1.8/gems/railties-3.0.6/lib/rails/commands/console.rb:8:in `start'
from /Library/Ruby/Gems/1.8/gems/railties-3.0.6/lib/rails/commands.rb:23
from script/rails:6:in `require'
from script/rails:6
Hmm... so i tried to uninstall the mysql2 gem, and reinstall the version 0.2.7 gem
sudo gem uninstall mysql2 -i /Library/Ruby/Gems/1.8
And I changed the gemfile:
gem 'mysql2','0.2.7'
Ran Bundler in my app directory:
bundle install
But it installed the version 0.3.2 back again!!! Can anyone help, I honestly don't know what happened here.
sudo gem uninstall mysql2
in Gemfile gem 'mysql2', '< 0.3'
bundle update
with your
gem 'mysql2','0.2.7'
Try
bundle update
it builds the bundle from scratch
I have this error when I try to start script/server:
/opt/ruby1.8/lib/ruby/site_ruby/1.8/rubygems.rb:827:in `report_activate_error': RubyGem version error: rack(1.0.0 not ~> 1.0.1) (Gem::LoadError)
from /opt/ruby1.8/lib/ruby/site_ruby/1.8/rubygems.rb:261:in `activate'
from /opt/ruby1.8/lib/ruby/site_ruby/1.8/rubygems.rb:68:in `gem'
from /opt/ruby1.8/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller.rb:34
from /opt/ruby1.8/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /opt/ruby1.8/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /opt/ruby1.8/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
from /opt/ruby1.8/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
from /opt/ruby1.8/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
from /opt/ruby1.8/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/commands/server.rb:2
from /opt/ruby1.8/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /opt/ruby1.8/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from script/server:3
It's very annoying because, I did:
Successfully installed rack-1.1.0
1 gem installed
Installing ri documentation for rack-1.1.0...
Installing RDoc documentation for rack-1.1.0...
But it always says that error. I have Rails 2.3.5 but I don't think the error is Rails related, but more like my server-related lol.
Thanks for help!
You installed Rack 1.1.0, the version required is 1.0.x.
$ gem uninstall rack
$ gem install rack -v 1.0.1
the above works, when installing, you have to indicate the version: "-v 1.0.1"
for some reason, it wont work otherwise.