Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rbx-2.2.10: Permission denied - /root/.rbx (Errno::EACCES) #113

Open
darylrobbins opened this issue Sep 3, 2014 · 2 comments
Open

rbx-2.2.10: Permission denied - /root/.rbx (Errno::EACCES) #113

darylrobbins opened this issue Sep 3, 2014 · 2 comments

Comments

@darylrobbins
Copy link

When switching from Ruby-2.1.2 to rbx-2.2.10 (on Ubuntu 14.04.1), I am seeing the following compilation error:

linking shared-object melbourne.so
/tmp/ruby-build.20140903173505.50328/rubinius-2.2.10/staging/bin/rbx extconf.rb
An exception occurred loading Rubygems:

    Permission denied - /root/.rbx (Errno::EACCES)

Backtrace:

                          Errno.handle at kernel/common/errno.rb:17
                 File::Stat#initialize at kernel/common/stat.rb:35
                           File.owned? at kernel/common/file.rb:1072
  Rubinius::ToolSets::Runtime::Compiler.compiled_cache_writable? at \
          /tmp/ruby-build.20140903173505.50328/rubinius-2.2.10/staging/runtime/gems/rubinius-compiler-2.1.1/lib/rubinius/compiler/compiler.rbc:30
 Rubinius::ToolSets::Runtime::Compiler.compiled_name at /tmp
                                                        /ruby-build.20140903173505.50328
                                                        /rubinius-2.2.10/staging
                                                        /runtime/gems
                                                        /rubinius-compiler-2.1.1
                                                        /lib/rubinius/compiler
                                                        /compiler.rbc:60
        Rubinius::CodeLoader#load_file at kernel/delta/code_loader.rb:178
          Rubinius::CodeLoader#require at kernel/common/code_loader.rb:128
          Rubinius::CodeLoader.require at kernel/common/code_loader.rb:237
    Rubinius::CodeLoader.load_rubygems at kernel/delta/code_loader.rb:123
             Rubinius::Loader#rubygems at kernel/loader.rb:573
                 Rubinius::Loader#main at kernel/loader.rb:819
rake aborted!
Command failed with status (1): [/tmp/ruby-build.20140903173505.50328/rubin...]
/tmp/ruby-build.20140903173505.50328/rubinius-2.2.10/rakelib/gems.rake:5:in `bootstrap_rubinius'
/tmp/ruby-build.20140903173505.50328/rubinius-2.2.10/rakelib/gems.rake:68:in `block (4 levels) in <top (required)>'
/tmp/ruby-build.20140903173505.50328/rubinius-2.2.10/rakelib/gems.rake:67:in `chdir'
/tmp/ruby-build.20140903173505.50328/rubinius-2.2.10/rakelib/gems.rake:67:in `block (3 levels) in <top (required)>'
/tmp/ruby-build.20140903173505.50328/rubinius-2.2.10/rakelib/gems.rake:66:in `block (2 levels) in <top (required)>'
Tasks: TOP => install => build:build => gems:extensions
(See full trace by running task with --trace)

Here is the chef trace for context:

---- Begin output of /opt/rbenv/bin/rbenv install rbx-2.2.10 ----
STDOUT: 
STDERR: Downloading yaml-0.1.6.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/7da6971b4bd08a986dd2a61353bc422362bd0edcc67d7ebaac68c95f74182749
Installing yaml-0.1.6...
Installed yaml-0.1.6 to /opt/rbenv/versions/rbx-2.2.10

Downloading rubinius-2.2.10.tar.bz2...
-> http://dqw8nmjcqpjn7.cloudfront.net/2a3e6b71f27073b8d83b9592b05523af70bc147ddcd0673bffae55b4167c9d81
Installing rubinius-2.2.10...

BUILD FAILED

Inspect or clean up the working tree at /tmp/ruby-build.20140903173505.50328
Results logged to /tmp/ruby-build.20140903173505.50328.log

Last 10 log lines:
                 Rubinius::Loader#main at kernel/loader.rb:819
rake aborted!
Command failed with status (1): [/tmp/ruby-build.20140903173505.50328/rubin...]
/tmp/ruby-build.20140903173505.50328/rubinius-2.2.10/rakelib/gems.rake:5:in `bootstrap_rubinius'
/tmp/ruby-build.20140903173505.50328/rubinius-2.2.10/rakelib/gems.rake:68:in `block (4 levels) in <top (required)>'
/tmp/ruby-build.20140903173505.50328/rubinius-2.2.10/rakelib/gems.rake:67:in `chdir'
/tmp/ruby-build.20140903173505.50328/rubinius-2.2.10/rakelib/gems.rake:67:in `block (3 levels) in <top (required)>'
/tmp/ruby-build.20140903173505.50328/rubinius-2.2.10/rakelib/gems.rake:66:in `block (2 levels) in <top (required)>'
Tasks: TOP => install => build:build => gems:extensions
(See full trace by running task with --trace)
---- End output of /opt/rbenv/bin/rbenv install rbx-2.2.10 ----
Ran /opt/rbenv/bin/rbenv install rbx-2.2.10 returned 1


Cookbook Trace:
---------------
/var/chef/cache/cookbooks/rbenv/providers/ruby.rb:35:in `block in class_from_file'


Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/app-admin/recipes/_ruby.rb

  6: rbenv_ruby node['app-admin']['ruby']['version']
  7: rbenv_gem "bundler" do



Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/app-admin/recipes/_ruby.rb:6:in `from_file'

rbenv_ruby("rbx-2.2.10") do
  action :install
  retries 0
  retry_delay 2
  guard_interpreter :default
  cookbook_name "app-admin"
  recipe_name "_ruby"
end



Recipe: timezone-ii::debian
  * bash[dpkg-reconfigure tzdata] action run
    - execute "bash"  "/tmp/chef-script20140903-49150-igbbzm"


Running handlers:
[2014-09-03T17:39:17+00:00] ERROR: Running exception handlers
  - SyslogReporting
Running handlers complete

[2014-09-03T17:39:17+00:00] ERROR: Exception handlers complete
[2014-09-03T17:39:17+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
Chef Client failed. 28 resources updated in 307.0633648 seconds
[2014-09-03T17:39:17+00:00] ERROR: rbenv_ruby[rbx-2.2.10] (app-admin::_ruby line 6) had an error: Mixlib::ShellOut::ShellCommandFailed: 
---- Begin output of /opt/rbenv/bin/rbenv install rbx-2.2.10 ----
STDOUT: 
STDERR: Downloading yaml-0.1.6.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/7da6971b4bd08a986dd2a61353bc422362bd0edcc67d7ebaac68c95f74182749
Installing yaml-0.1.6...
Installed yaml-0.1.6 to /opt/rbenv/versions/rbx-2.2.10

Downloading rubinius-2.2.10.tar.bz2...
-> http://dqw8nmjcqpjn7.cloudfront.net/2a3e6b71f27073b8d83b9592b05523af70bc147ddcd0673bffae55b4167c9d81
Installing rubinius-2.2.10...

BUILD FAILED

Inspect or clean up the working tree at /tmp/ruby-build.20140903173505.50328
Results logged to /tmp/ruby-build.20140903173505.50328.log

Last 10 log lines:
                 Rubinius::Loader#main at kernel/loader.rb:819
rake aborted!
Command failed with status (1): [/tmp/ruby-build.20140903173505.50328/rubin...]
/tmp/ruby-build.20140903173505.50328/rubinius-2.2.10/rakelib/gems.rake:5:in `bootstrap_rubinius'
/tmp/ruby-build.20140903173505.50328/rubinius-2.2.10/rakelib/gems.rake:68:in `block (4 levels) in <top (required)>'
/tmp/ruby-build.20140903173505.50328/rubinius-2.2.10/rakelib/gems.rake:67:in `chdir'
/tmp/ruby-build.20140903173505.50328/rubinius-2.2.10/rakelib/gems.rake:67:in `block (3 levels) in <top (required)>'
/tmp/ruby-build.20140903173505.50328/rubinius-2.2.10/rakelib/gems.rake:66:in `block (2 levels) in <top (required)>'
Tasks: TOP => install => build:build => gems:extensions
(See full trace by running task with --trace)
---- End output of /opt/rbenv/bin/rbenv install rbx-2.2.10 ----
Ran /opt/rbenv/bin/rbenv install rbx-2.2.10 returned 1
[2014-09-03T17:39:18+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

It looks like /root/.rbx does not exist when it is attempting to be accessed.

This issue looks similar to #46, although there was never a resolution to that one.

@darylrobbins
Copy link
Author

Manually creating the directory got me past the issue, so the problem is that it's missing; unrelated to permissions. The question is why it's not being created.

@kh0r
Copy link

kh0r commented Oct 9, 2014

I don't think the rbenv user/group should have access to the /root folder. Isn't there a better solution for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants