Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Ruby on rails on gentoo on user account, not root
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
dylanthomasfan
n00b
n00b


Joined: 02 Mar 2005
Posts: 27

PostPosted: Sun Oct 28, 2012 9:40 pm    Post subject: Ruby on rails on gentoo on user account, not root Reply with quote

Folks,

Ruby on Rails newbie here.

I have followed the instructions in several gentoo posts here in the forum, but have not found a way to install ruby on rails on gentoo in a non-root account. Can someone explain all the steps necessary to install ruby on rails in Gentoo? I have tried everything and I have had the chance to try, and I am not not getting anywhere. Here's the current state of my x86_64 system:

Code:
$<nonrootuser> ruby -v
ruby 1.8.7 (2011-12-28 patchlevel 357) [x86_64-linux]


Code:
$<nonrootuser> rails -v
Rails 2.3.14


Code:
$<nonrootuser> gem -v
1.3.7
.

When I try to create a new app:

Code:
$<nonrootuser> rails new first_app
/usr/lib64/ruby/gems/1.8/gems/rails-2.3.14/lib/rails_generator/options.rb:32:in `default_options': undefined method `write_inheritable_attribute' for Rails::Generator::Base:Class (NoMethodError)
   from /usr/lib64/ruby/gems/1.8/gems/rails-2.3.14/lib/rails_generator/base.rb:90
   from /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
   from /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
   from /usr/lib64/ruby/gems/1.8/gems/rails-2.3.14/lib/rails_generator.rb:37
   from /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
   from /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
   from /usr/lib64/ruby/gems/1.8/gems/rails-2.3.14/bin/rails:15
   from /usr/bin/rails:8:in `load'
   from /usr/bin/rails:8


Any help you can provide is appreciated.

Oh, I installed rvm like so:

Code:
emerge sys-libs/rvm


but I really do not understand how to use it. I have run

Code:
$ gem install rails
both as root and nonrootuser, and creation of a new app still does not work. At the very least, could someone point out how I could completely wipe out my previous installation and its files, config etc. in both root and nonrootuser so I can start over?


Thanks,
Sonny.
Back to top
View user's profile Send private message
dylanthomasfan
n00b
n00b


Joined: 02 Mar 2005
Posts: 27

PostPosted: Mon Oct 29, 2012 12:15 am    Post subject: Reply with quote

I'll post a reply to my own post because someone else may find this useful. I have seen plenty of posts both here and on stackoverflow on this topic. I hope I do a good job of explaining this here so that it may help somebody else.

The main issue was that the binary executables I was looking for were pointing to the system-wide binaries, and those binaries were pointing to the libraries that need root access (recall that I wanted this to be a per-user configuration). Now, wherever I run rails, I run "$GEM_HOME/bin/rails" instead. Also, it is useful to set GEM_HOME and GEM_PATH in your .bashrc.

Hope this helps someone.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum