Author Topic: [Solved] /usr/bin not writeable for Gems  (Read 1069 times)

Offline flebber

  • Jr. Member
  • **
  • Posts: 14
[Solved] /usr/bin not writeable for Gems
« on: May 14, 2011, 07:24:22 AM »
How can i make /usr/bin & ~/.gem since /usr/lib/ruby/gems/1.8 both writable so I can use Rubygems?

I have updated my path using.
Code: [Select]
[sayth@localhost 1.8]$ export PATH=/home/sayth/.gem/ruby/1.8/bin:$PATH
But still receive this error when attempting to installing gems.

Code: [Select]
[sayth@localhost 1.8]$ gem install rails
WARNING:  Installing to ~/.gem since /usr/lib/ruby/gems/1.8 and
          /usr/bin aren't both writable.
ERROR:  Error installing rails:
        bundler requires RubyGems version >= 1.3.6
[sayth@localhost 1.8]$
« Last Edit: May 14, 2011, 08:16:12 AM by flebber »

Offline Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6395
  • I'm going South
Re: /usr/bin not writeable for Gems
« Reply #1 on: May 14, 2011, 07:33:08 AM »
How can i make /usr/bin & ~/.gem since /usr/lib/ruby/gems/1.8 both writable so I can use Rubygems?

I have updated my path using.
Code: [Select]
[sayth@localhost 1.8]$ export PATH=/home/sayth/.gem/ruby/1.8/bin:$PATH
But still receive this error when attempting to installing gems.

Code: [Select]
[sayth@localhost 1.8]$ gem install rails
WARNING:  Installing to ~/.gem since /usr/lib/ruby/gems/1.8 and
          /usr/bin aren't both writable.
ERROR:  Error installing rails:
        bundler requires RubyGems version >= 1.3.6
[sayth@localhost 1.8]$


I know nothing about Rubygems but it seems that you are trying to install as your ordinary user. Usually only root can write to the /usr directory and its subdirectories.

The conflicting versions are probably a different problem.
« Last Edit: May 14, 2011, 07:37:47 AM by Bald Brick »
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Offline flebber

  • Jr. Member
  • **
  • Posts: 14
Re: /usr/bin not writeable for Gems
« Reply #2 on: May 14, 2011, 07:35:41 AM »
So can i create an "exception" to allow the gems program to write?

Offline Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6395
  • I'm going South
Re: /usr/bin not writeable for Gems
« Reply #3 on: May 14, 2011, 07:44:01 AM »
So can i create an "exception" to allow the gems program to write?

You could su to root before you install, but I actually think a version conflict is your main problem. After all, gem is trying to install rails to your home directory instead of /usr when it finds that /usr isn't writable by an ordinary user -- and it fails there too.

You need help from a Ruby expert. And I think your problem belongs in the Advanced Users Section of the forum.
« Last Edit: May 14, 2011, 07:50:13 AM by Bald Brick »
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Offline flebber

  • Jr. Member
  • **
  • Posts: 14
[Solved] Re: /usr/bin not writeable for Gems
« Reply #4 on: May 14, 2011, 08:15:50 AM »
Actually i have resolved. As a user the directions from http://docs.rubygems.org/read/chapter/3 should be ignored as they wont apply or provide best experience i have worked out.

Ruby shouldn't be installed via synaptic unless cairo or tk support is required. All installs should be run via rvm. Following the instructions herehttps://rvm.beginrescueend.com/rvm/basics/ rvm can be installed and then as many versions of ruby, jruby, rubinus etc can be installed. if done this way gems support is automatically installed and usable.

This probably could be written more fully in the future for another Rubyists coming to Pcliuxos. I may write one soon and post it here but not tonight/this morning as it is quickly approaching 1am and the coffee has worn off.