I've installed ruby-rubocop for VSCode, and gem installed rubocop, but every time I save a file, this error is thrown:
cannot load such file -- rubocop/rspec/focused
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/rubocop-0.85.0/lib/rubocop/config_loader_resolver.rb:15:in `block in resolve_requires'
/Library/Ruby/Gems/2.6.0/gems/rubocop-0.85.0/lib/rubocop/config_loader_resolver.rb:11:in `each'
/Library/Ruby/Gems/2.6.0/gems/rubocop-0.85.0/lib/rubocop/config_loader_resolver.rb:11:in `resolve_requires'
/Library/Ruby/Gems/2.6.0/gems/rubocop-0.85.0/lib/rubocop/config_loader.rb:45:in `load_file'
/Library/Ruby/Gems/2.6.0/gems/rubocop-0.85.0/lib/rubocop/config_loader.rb:90:in `configuration_from_file'
/Library/Ruby/Gems/2.6.0/gems/rubocop-0.85.0/lib/rubocop/config_store.rb:54:in `for_dir'
/Library/Ruby/Gems/2.6.0/gems/rubocop-0.85.0/lib/rubocop/config_store.rb:44:in `for'
/Library/Ruby/Gems/2.6.0/gems/rubocop-0.85.0/lib/rubocop/target_finder.rb:180:in `block in process_explicit_path'
/Library/Ruby/Gems/2.6.0/gems/rubocop-0.85.0/lib/rubocop/target_finder.rb:179:in `reject'
/Library/Ruby/Gems/2.6.0/gems/rubocop-0.85.0/lib/rubocop/target_finder.rb:179:in `process_explicit_path'
/Library/Ruby/Gems/2.6.0/gems/rubocop-0.85.0/lib/rubocop/target_finder.rb:39:in `block in find'
/Library/Ruby/Gems/2.6.0/gems/rubocop-0.85.0/lib/rubocop/target_finder.rb:35:in `each'
/Library/Ruby/Gems/2.6.0/gems/rubocop-0.85.0/lib/rubocop/target_finder.rb:35:in `find'
/Library/Ruby/Gems/2.6.0/gems/rubocop-0.85.0/lib/rubocop/runner.rb:69:in `find_target_files'
/Library/Ruby/Gems/2.6.0/gems/rubocop-0.85.0/lib/rubocop/runner.rb:34:in `run'
/Library/Ruby/Gems/2.6.0/gems/rubocop-0.85.0/lib/rubocop/cli/command/execute_runner.rb:21:in `execute_runner'
/Library/Ruby/Gems/2.6.0/gems/rubocop-0.85.0/lib/rubocop/cli/command/execute_runner.rb:13:in `run'
/Library/Ruby/Gems/2.6.0/gems/rubocop-0.85.0/lib/rubocop/cli/command.rb:10:in `run'
/Library/Ruby/Gems/2.6.0/gems/rubocop-0.85.0/lib/rubocop/cli/environment.rb:17:in `run'
/Library/Ruby/Gems/2.6.0/gems/rubocop-0.85.0/lib/rubocop/cli.rb:65:in `run_command'
/Library/Ruby/Gems/2.6.0/gems/rubocop-0.85.0/lib/rubocop/cli.rb:72:in `execute_runners'
/Library/Ruby/Gems/2.6.0/gems/rubocop-0.85.0/lib/rubocop/cli.rb:41:in `run'
/Library/Ruby/Gems/2.6.0/gems/rubocop-0.85.0/exe/rubocop:13:in `block in <top (required)>'
Please help! I've been trying to make this work, and scouring the internet for solutions, but haven't had any luck yet.
That cop is part of the rubocop-rspec plug-in, so you may also have to run gem install rubocop-rspec.
Found and fixed the issue.
As it turns out, the culprits are:
rubocop -v 0.85.0
rubocop-rspec
The fix was just to downgrade both since our organization is using the older versions. So now I installed:
rubocop -v 0.75.1
rubocop-rspec-focused
Related
while generating controllers, I am getting this error message:
Leticias-MacBook-Pro:portfolio Tish$ rails g controller welcome index about music loops projects
/Users/Tish/.rvm/gems/ruby-2.3.1/gems/sqlite3-1.3.12/lib/sqlite3.rb:6:in `require': incompatible library version - /Users/Tish/.rvm/gems/ruby-2.3.1/gems/sqlite3-1.3.12/lib/sqlite3/sqlite3_native.bundle (fatal)
from /Users/Tish/.rvm/gems/ruby-2.3.1/gems/sqlite3-1.3.12/lib/sqlite3.rb:6:in `rescue in <top (required)>'
from /Users/Tish/.rvm/gems/ruby-2.3.1/gems/sqlite3-1.3.12/lib/sqlite3.rb:2:in `<top (required)>'
from /Users/Tish/.rvm/gems/ruby-2.3.1/gems/bundler-1.13.6/lib/bundler/runtime.rb:91:in `require'
from /Users/Tish/.rvm/gems/ruby-2.3.1/gems/bundler-1.13.6/lib/bundler/runtime.rb:91:in `block (2 levels) in require'
from /Users/Tish/.rvm/gems/ruby-2.3.1/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in `each'
from /Users/Tish/.rvm/gems/ruby-2.3.1/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in `block in require'
from /Users/Tish/.rvm/gems/ruby-2.3.1/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:in `each'
from /Users/Tish/.rvm/gems/ruby-2.3.1/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:in `require'
from /Users/Tish/.rvm/gems/ruby-2.3.1/gems/bundler-1.13.6/lib/bundler.rb:106:in `require'
from /Users/Tish/Projects/portfolio/config/application.rb:7:in `<top (required)>'
from /Users/Tish/.rvm/gems/ruby-2.3.1/gems/spring-2.0.0/lib/spring/application.rb:82:in `require'
from /Users/Tish/.rvm/gems/ruby-2.3.1/gems/spring-2.0.0/lib/spring/application.rb:82:in `preload'
from /Users/Tish/.rvm/gems/ruby-2.3.1/gems/spring-2.0.0/lib/spring/application.rb:143:in `serve'
from /Users/Tish/.rvm/gems/ruby-2.3.1/gems/spring-2.0.0/lib/spring/application.rb:131:in `block in run'
from /Users/Tish/.rvm/gems/ruby-2.3.1/gems/spring-2.0.0/lib/spring/application.rb:125:in `loop'
from /Users/Tish/.rvm/gems/ruby-2.3.1/gems/spring-2.0.0/lib/spring/application.rb:125:in `run'
from /Users/Tish/.rvm/gems/ruby-2.3.1/gems/spring-2.0.0/lib/spring/application/boot.rb:19:in `<top (required)>'
from /usr/local/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'
Nothing I have tried makes it stop. I have reinstalled every gem it complains about, but the changes do not persist. I've followed every fix I can find/understand but I am chasing my tail on this one.
Working on OSX...
Your rails is not linked with the right ruby version. Use the following code:
rvm use ruby-<version number> like: (rvm use ruby-2.1.4)
then reinstall the bundler:
gem uninstall bundler
gem install bundler
bundle install once again with the new version.
bundle install
Then proceed with your rails g command.
I'm trying to launch my rails app on VirtualBox Ubuntu 14.04, but for some reason every time I use any rails or gem command like rails s or bundle install I get the following error message:
/home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/ext/builder.rb:159:in `synchronize': ERROR: Failed to build gem native extension. (Gem::Ext::BuildError)
ERROR: Failed to build gem native extension.
deadlock; recursive locking
Gem files will remain installed in /home/jakup/.rvm/gems/ruby-2.2.4#global/gems/gem-wrappers-1.2.7 for inspection.
Results logged to /home/jakup/.rvm/gems/ruby-2.2.4#global/extensions/x86_64-linux/2.2.0-static/gem-wrappers-1.2.7/gem_make.out
Gem files will remain installed in /home/jakup/.rvm/gems/ruby-2.2.4/gems/nokogiri-1.6.7.2 for inspection.
Results logged to /home/jakup/.rvm/gems/ruby-2.2.4/extensions/x86_64-linux/2.2.0-static/nokogiri-1.6.7.2/gem_make.out
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/ext/builder.rb:159:in `build_extension'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/ext/builder.rb:198:in `block in build_extensions'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/ext/builder.rb:195:in `each'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/ext/builder.rb:195:in `build_extensions'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:1436:in `block in build_extensions'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/user_interaction.rb:45:in `use_ui'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:1434:in `build_extensions'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/stub_specification.rb:60:in `build_extensions'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/basic_specification.rb:56:in `contains_requirable_file?'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:925:in `block in find_inactive_by_path'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:924:in `each'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:924:in `find'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:924:in `find_inactive_by_path'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems.rb:185:in `try_activate'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:132:in `rescue in require'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:144:in `require'
from /home/jakup/.rvm/gems/ruby-2.2.4/gems/psych-2.0.17/lib/psych.rb:6:in `<top (required)>'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems.rb:601:in `load_yaml'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/config_file.rb:327:in `load_file'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/config_file.rb:196:in `initialize'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems.rb:289:in `new'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems.rb:289:in `configuration'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/ext/builder.rb:63:in `run'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/ext/ext_conf_builder.rb:37:in `block in build'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tempfile.rb:319:in `open'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/ext/ext_conf_builder.rb:17:in `build'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/ext/builder.rb:161:in `block (2 levels) in build_extension'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/ext/builder.rb:160:in `chdir'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/ext/builder.rb:160:in `block in build_extension'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/ext/builder.rb:159:in `synchronize'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/ext/builder.rb:159:in `build_extension'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/ext/builder.rb:198:in `block in build_extensions'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/ext/builder.rb:195:in `each'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/ext/builder.rb:195:in `build_extensions'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:1436:in `block in build_extensions'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/user_interaction.rb:45:in `use_ui'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:1434:in `build_extensions'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/stub_specification.rb:60:in `build_extensions'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/basic_specification.rb:56:in `contains_requirable_file?'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:68:in `block in require'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:67:in `each'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:67:in `find'
from /home/jakup/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:67:in `require'
from /home/jakup/.rvm/gems/ruby-2.2.4/gems/railties-4.2.6/bin/rails:9:in `<top (required)>'
from /home/jakup/.rbenv/versions/2.2.3/bin/rails:23:in `load'
from /home/jakup/.rbenv/versions/2.2.3/bin/rails:23:in `<main>'
I used to have this error in the past when I set my network adapter to bridged network on VirtualBox, but now this error occurs even when I'm not on bridged network, any ideas?
I will write in a form of a answer just to easier write.
Thy to delete all previously installed gems (e.g. delete the gems manually) and try to re-install them. It should be working then.
Don't delete these (ignore the versions of the gems):
rake (10.4.2)
rdoc (4.2.1)
rubygems-bundler (1.4.4)
rvm (1.11.3.9)
gem-wrappers (1.2.7)
bundler (1.11.2)
bundler-unload (1.0.2)
Also, try to install gems inside .bundle directory not in a global namespace. Install it at first like bundle install --path .bundle, and I think every next time it will be using that directory
I found a (temporary?) solution..
I was running the project from a shared folder between windows (host) and ubuntu (guest in virtualbox) for some reason when I run the project locally, so not within the shared folder and I unmount the folder, it works.
Don't ask me the details of why it works, it just magically does for some reason.
I am learning Compass with Django/Zinnia. Running the following to produce css produces an error that I don't really understand. Thanks!
cd /var/www/static/zinnia
compass compile ./ --trace
LoadError on line ["36"] of /usr/lib/ruby/1.9.1/rubygems/custom_require.rb: cannot load such file -- susy
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/var/lib/gems/1.9.1/gems/compass-0.12.2/lib/compass/configuration/data.rb:161:in `require'
/var/www/static/zinnia/./config.rb:2:in `get_binding'
/var/lib/gems/1.9.1/gems/compass-0.12.2/lib/compass/configuration/serialization.rb:24:in `eval'
/var/lib/gems/1.9.1/gems/compass-0.12.2/lib/compass/configuration/serialization.rb:24:in `parse_string'
/var/lib/gems/1.9.1/gems/compass-0.12.2/lib/compass/configuration/serialization.rb:15:in `block in _parse'
/var/lib/gems/1.9.1/gems/compass-0.12.2/lib/compass/configuration/serialization.rb:14:in `open'
/var/lib/gems/1.9.1/gems/compass-0.12.2/lib/compass/configuration/serialization.rb:14:in `_parse'
/var/lib/gems/1.9.1/gems/compass-0.12.2/lib/compass/configuration/file_data.rb:7:in `block in new_from_file'
/var/lib/gems/1.9.1/gems/compass-0.12.2/lib/compass/configuration/inheritance.rb:204:in `with_defaults'
/var/lib/gems/1.9.1/gems/compass-0.12.2/lib/compass/configuration/file_data.rb:6:in `new_from_file'
/var/lib/gems/1.9.1/gems/compass-0.12.2/lib/compass/configuration/helpers.rb:42:in `configuration_for'
/var/lib/gems/1.9.1/gems/compass-0.12.2/lib/compass/configuration/helpers.rb:97:in `add_project_configuration'
/var/lib/gems/1.9.1/gems/compass-0.12.2/lib/compass/commands/project_base.rb:31:in `add_project_configuration'
/var/lib/gems/1.9.1/gems/compass-0.12.2/lib/compass/commands/project_base.rb:25:in `configure!'
/var/lib/gems/1.9.1/gems/compass-0.12.2/lib/compass/commands/project_base.rb:15:in `initialize'
/var/lib/gems/1.9.1/gems/compass-0.12.2/lib/compass/commands/update_project.rb:37:in `initialize'
/var/lib/gems/1.9.1/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:42:in `new'
/var/lib/gems/1.9.1/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:42:in `perform!'
/var/lib/gems/1.9.1/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:15:in `run!'
/var/lib/gems/1.9.1/gems/compass-0.12.2/bin/compass:30:in `block in <top (required)>'
/var/lib/gems/1.9.1/gems/compass-0.12.2/bin/compass:44:in `call'
/var/lib/gems/1.9.1/gems/compass-0.12.2/bin/compass:44:in `<top (required)>'
/usr/local/bin/compass:23:in `load'
/usr/local/bin/compass:23:in `<main>'
Compass was not installed. I issued the following per cimmanon's suggestions:
gem install compass
gem install compass-susy-plugin
gem install stitch
via http://data.agaric.com/installing-compass-and-sass-susy-ubuntu
Also had to install java for compass-validate to work.
Due to an issue in Sprockets that fails in Ruby 2.0, I need to update my Rails version to the latest version. As a result, my Gemfile looks like this:
gem 'rails', git: 'git://github.com/rails/rails.git', branch: "3-2-stable"
which then results in the stack trace shown below. Rails edge also shows the same problem, though they are running their test suite against Ruby 2.0 so it must be compatible.
So I'm guessing there may be dependent libraries that either Rails or Ruby were built against that aren't playing nice with Ruby 2.0-preview1
> bundle
Updating git://github.com/rails/rails.git
Unfortunately, a fatal error has occurred. Please see the Bundler
troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
.rvm/rubies/ruby-2.0.0-preview1/lib/ruby/2.0.0/psych.rb:205:in `parse': (<unknown>): mapping values are not allowed in this context at line 8 column 35 (Psych::SyntaxError)
from .rvm/rubies/ruby-2.0.0-preview1/lib/ruby/2.0.0/psych.rb:205:in `parse_stream'
from .rvm/rubies/ruby-2.0.0-preview1/lib/ruby/2.0.0/psych.rb:153:in `parse'
from .rvm/rubies/ruby-2.0.0-preview1/lib/ruby/2.0.0/psych.rb:129:in `load'
from .rvm/rubies/ruby-2.0.0-preview1/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb:491:in `from_yaml'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler.rb:294:in `block in load_gemspec_uncached'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler.rb:291:in `chdir'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler.rb:291:in `load_gemspec_uncached'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler.rb:282:in `load_gemspec'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler/source.rb:411:in `block in load_spec_files'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler/source.rb:410:in `each'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler/source.rb:410:in `load_spec_files'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler/source.rb:799:in `load_spec_files'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler/source.rb:381:in `local_specs'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler/source.rb:774:in `specs'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler/definition.rb:491:in `block in converge_locked_specs'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler/definition.rb:480:in `each'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler/definition.rb:480:in `converge_locked_specs'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler/definition.rb:166:in `resolve'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler/definition.rb:113:in `specs'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler/definition.rb:108:in `resolve_remotely!'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler/installer.rb:81:in `run'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler/installer.rb:14:in `install'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler/cli.rb:230:in `install'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler/vendor/thor/task.rb:27:in `run'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler/vendor/thor/invocation.rb:120:in `invoke_task'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler/vendor/thor.rb:275:in `dispatch'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler/vendor/thor/base.rb:408:in `start'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/bin/bundle:14:in `block in <top (required)>'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler/friendly_errors.rb:4:in `with_friendly_errors'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/bin/bundle:14:in `<top (required)>'
from .rvm/gems/ruby-2.0.0-preview1#global/bin/bundle:19:in `load'
from .rvm/gems/ruby-2.0.0-preview1#global/bin/bundle:19:in `<main>'
from .rvm/gems/ruby-2.0.0-preview1#album_releases/bin/ruby_noexec_wrapper:14:in `eval'
from .rvm/gems/ruby-2.0.0-preview1#album_releases/bin/ruby_noexec_wrapper:14:in `<main>'
This was a bug in Bundler, as described here: https://github.com/rails/rails/issues/8136
It has since been fixed.
I had this issue. It was caused by psych seeing code like "this:" in a heredoc within a gemspec (Prawn, in my case), and thinking it was a hash. I believe it's a regression in 2.0.0-preview1, because i had had ruby-head prior, and did not hit this issue.
I'm trying to install rails. I'm new to this stuff, so sorry if I'm missing something obvious. I've got most things working, but when I actually try "rails new blog", I get the following error:
/Users/sashafklein/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:247:in `mkdir': Permission denied - /rails_projects/blog (Errno::EACCES)
from /Users/sashafklein/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:247:in `fu_mkdir'
from /Users/sashafklein/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:221:in `block (2 levels) in mkdir_p'
from /Users/sashafklein/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:219:in `reverse_each'
from /Users/sashafklein/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:219:in `block in mkdir_p'
from /Users/sashafklein/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:205:in `each'
from /Users/sashafklein/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:205:in `mkdir_p'
from /Users/sashafklein/.rvm/gems/ruby-1.9.3-p194#rails3tutorial2ndEd/gems/thor-0.14.6/lib/thor/actions/empty_directory.rb:51:in `block in invoke!'
from /Users/sashafklein/.rvm/gems/ruby-1.9.3-p194#rails3tutorial2ndEd/gems/thor-0.14.6/lib/thor/actions/empty_directory.rb:114:in `call'
from /Users/sashafklein/.rvm/gems/ruby-1.9.3-p194#rails3tutorial2ndEd/gems/thor-0.14.6/lib/thor/actions/empty_directory.rb:114:in `invoke_with_conflict_check'
from /Users/sashafklein/.rvm/gems/ruby-1.9.3-p194#rails3tutorial2ndEd/gems/thor-0.14.6/lib/thor/actions/empty_directory.rb:50:in `invoke!'
from /Users/sashafklein/.rvm/gems/ruby-1.9.3-p194#rails3tutorial2ndEd/gems/thor-0.14.6/lib/thor/actions.rb:95:in `action'
from /Users/sashafklein/.rvm/gems/ruby-1.9.3-p194#rails3tutorial2ndEd/gems/thor-0.14.6/lib/thor/actions/empty_directory.rb:15:in `empty_directory'
from /Users/sashafklein/.rvm/gems/ruby-1.9.3-p194#rails3tutorial2ndEd/gems/railties-3.2.3/lib/rails/generators/app_base.rb:103:in `create_root'
from (eval):1:in `create_root'
from /Users/sashafklein/.rvm/gems/ruby-1.9.3-p194#rails3tutorial2ndEd/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
from /Users/sashafklein/.rvm/gems/ruby-1.9.3-p194#rails3tutorial2ndEd/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
from /Users/sashafklein/.rvm/gems/ruby-1.9.3-p194#rails3tutorial2ndEd/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `block in invoke_all'
from /Users/sashafklein/.rvm/gems/ruby-1.9.3-p194#rails3tutorial2ndEd/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `each'
from /Users/sashafklein/.rvm/gems/ruby-1.9.3-p194#rails3tutorial2ndEd/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `map'
from /Users/sashafklein/.rvm/gems/ruby-1.9.3-p194#rails3tutorial2ndEd/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `invoke_all'
from /Users/sashafklein/.rvm/gems/ruby-1.9.3-p194#rails3tutorial2ndEd/gems/thor-0.14.6/lib/thor/group.rb:226:in `dispatch'
from /Users/sashafklein/.rvm/gems/ruby-1.9.3-p194#rails3tutorial2ndEd/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'
from /Users/sashafklein/.rvm/gems/ruby-1.9.3-p194#rails3tutorial2ndEd/gems/railties-3.2.3/lib/rails/commands/application.rb:38:in `<top (required)>'
from /Users/sashafklein/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/sashafklein/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/sashafklein/.rvm/gems/ruby-1.9.3-p194#rails3tutorial2ndEd/gems/railties-3.2.3/lib/rails/cli.rb:15:in `<top (required)>'
from /Users/sashafklein/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/sashafklein/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/sashafklein/.rvm/gems/ruby-1.9.3-p194#rails3tutorial2ndEd/gems/railties-3.2.3/bin/rails:7:in `<top (required)>'
from /Users/sashafklein/.rvm/gems/ruby-1.9.3-p194#rails3tutorial2ndEd/bin/rails:19:in `load'
from /Users/sashafklein/.rvm/gems/ruby-1.9.3-p194#rails3tutorial2ndEd/bin/rails:19:in `<main>'
from /Users/sashafklein/.rvm/gems/ruby-1.9.3-p194#rails3tutorial2ndEd/bin/ruby_noexec_wrapper:14:in `eval'
from /Users/sashafklein/.rvm/gems/ruby-1.9.3-p194#rails3tutorial2ndEd/bin/ruby_noexec_wrapper:14:in `<main>'
I've searched around for a way to fix it (tried gem install rails several times, fiddled around with some other stuff), but I can't get it to work. I'd really appreciate some help. I'm working on OS X Lion, and have installed Ruby and RVM and all that. Can't for the life of me figure out what I'm doing wrong.
Thanks!
Sasha
PS -- If I execute the above with "sudo", it returns this:
/Users/sashafklein/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find railties (>= 0) amongst [bigdecimal-1.1.0, io-console-0.3, json-1.5.4, minitest-2.5.1, rake-0.9.2.2, rdoc-3.9.4] (Gem::LoadError)
from /Users/sashafklein/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
from /Users/sashafklein/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems.rb:1231:in `gem'
from /Users/sashafklein/.rvm/gems/ruby-1.9.3-p194#rails3tutorial2ndEd/bin/rails:18:in `<main>'
from /Users/sashafklein/.rvm/gems/ruby-1.9.3-p194#rails3tutorial2ndEd/bin/ruby_noexec_wrapper:14:in `eval'
from /Users/sashafklein/.rvm/gems/ruby-1.9.3-p194#rails3tutorial2ndEd/bin/ruby_noexec_wrapper:14:in `<main>'
The thing is, I definitely have railties. And trying to reinstall via gem install doesn't fix anything.
I ran into exactly the same issue (on Mac). Was giving me the same error when i tried to create an application in a folder in HOME directory. But when i tried the same in one of user folders User/username it worked. I guess something to do with root permissions. Hope this helps.