# Gem install Rails issue

**URL:** <https://www.ruby-forum.com/t/gem-install-rails-issue/165455>\
**Category:** Rails\
**Created:** [April 14, 2009, 5:02am UTC](https://www.ruby-forum.com/t/gem-install-rails-issue/165455 "2009-04-14T05:02:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![devrubygem](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ac8455/32.png) [@devrubygem](https://www.ruby-forum.com/u/devrubygem)\
**Post date:** [April 14, 2009, 5:02am UTC](https://www.ruby-forum.com/t/gem-install-rails-issue/165455/1 "2009-04-14T05:02:12Z")

</div>

Im trying to install rails gem on OSX 10.5.6, but when i use the gem  
install rails command this message displays WARNING: Installing to  
~/.gem since /usr/local/lib/ruby/gems/1.8 and  
/usr/local/bin aren’t both writable.  
Successfully installed rails-2.3.2  
1 gem installed  
How can I get my gems to install to /usr/local/lib/ruby/gems/1.8 or  
/usr/local/bin which both are set up in my environment variable path.

Also When trying to start my server for my rails project using  
./script/server its displaying  
Salafee:views\_demo musdev$ ./script/server  
=\> Booting Mongrel  
=\> Rails 2.3.2 application starting on [http://0.0.0.0:3000](http://0.0.0.0:3000)  
=\> Call with -d to detach  
=\> Ctrl-C to shutdown server

Then when I go to http:/localhost:3000, and click on About your  
application environment I see a message saying  
Welcome aboard  
Youâ€™re riding Ruby on Rails!  
About your applicationâ€™s environment

We’re sorry, but something went wrong.

We’ve been notified about this issue and we’ll take a look at it  
shortly.

Thanks

---

<div class="post-metadata">

**Author:** ![devrubygem](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ac8455/32.png) [@devrubygem](https://www.ruby-forum.com/u/devrubygem)\
**Post date:** [April 14, 2009, 5:09am UTC](https://www.ruby-forum.com/t/gem-install-rails-issue/165455/2 "2009-04-14T05:09:08Z")

</div>

> Im trying to install rails gem on OSX 10.5.6, but when i use the gem  
> install rails command this message displays WARNING: Installing to  
> ~/.gem since /usr/local/lib/ruby/gems/1.8 and  
> /usr/local/bin aren’t both writable.  
> Successfully installed rails-2.3.2  
> 1 gem installed  
> How can I get my gems to install to /usr/local/lib/ruby/gems/1.8 or  
> /usr/local/bin which both are set up in my environment variable path.

sudo gem install …

That will prompt you for your administrator password. It might also  
install it into /Library/Ruby/Gems (which should be in your ruby load  
path as well by ddefault).

> Welcome aboard  
> You’re riding Ruby on Rails!  
> About your application’s environment
> 
> We’re sorry, but something went wrong.

Open up log/development.log and see what it says.

That initial page loads because public/index.html exists so mongrel  
isn’t even touching rails at that point.

-philip

---

<div class="post-metadata">

**Author:** ![devrubygem](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ac8455/32.png) [@devrubygem](https://www.ruby-forum.com/u/devrubygem)\
**Post date:** [April 14, 2009, 7:32am UTC](https://www.ruby-forum.com/t/gem-install-rails-issue/165455/3 "2009-04-14T07:32:44Z")

</div>

Philip H. wrote:

> > Im trying to install rails gem on OSX 10.5.6, but when i use the gem  
> > install rails command this message displays WARNING: Installing to  
> > ~/.gem since /usr/local/lib/ruby/gems/1.8 and  
> > /usr/local/bin aren’t both writable.  
> > Successfully installed rails-2.3.2  
> > 1 gem installed  
> > How can I get my gems to install to /usr/local/lib/ruby/gems/1.8 or  
> > /usr/local/bin which both are set up in my environment variable path.
> 
> sudo gem install …
> 
> That will prompt you for your administrator password. It might also  
> install it into /Library/Ruby/Gems (which should be in your ruby load  
> path as well by ddefault).
> 
> > Welcome aboard  
> > Youï¿½re riding Ruby on Rails!  
> > About your applicationï¿½s environment
> > 
> > We’re sorry, but something went wrong.
> 
> Open up log/development.log and see what it says.
> 
> That initial page loads because public/index.html exists so mongrel  
> isn’t even touching rails at that point.
> 
> -philip

Thanks philip, Im not seeing the problem with installing gems anymore  
after using the sudo command.  
As far as the development.log pertaining to the error I was seeing, the  
log says no such file to load – sqlite3

So i went to install the sqlite gem and this is what It displayed in my  
terminal

Salafee:views\_demo musdev$ sudo gem install sqlite  
Password:  
Building native extensions. This could take a while…  
ERROR: Error installing sqlite:  
ERROR: Failed to build gem native extension.

/usr/local/bin/ruby extconf.rb install sqlite  
checking for main() in -lsqlite… no  
checking for sqlite.h… no  
\*\*\* extconf.rb failed \*\*\*  
Could not create Makefile due to some reason, probably lack of  
necessary libraries and/or headers. Check the mkmf.log file for more  
details. You may need configuration options.

Provided configuration options:  
–with-opt-dir  
–without-opt-dir  
–with-opt-include  
–without-opt-include=${opt-dir}/include  
–with-opt-lib  
–without-opt-lib=${opt-dir}/lib  
–with-make-prog  
–without-make-prog  
–srcdir=.  
–curdir  
–ruby=/usr/local/bin/ruby  
–with-sqlite-dir  
–without-sqlite-dir  
–with-sqlite-include  
–without-sqlite-include=${sqlite-dir}/include  
–with-sqlite-lib  
–without-sqlite-lib=${sqlite-dir}/lib  
–with-sqlitelib  
–without-sqlitelib

Gem files will remain installed in  
/usr/local/lib/ruby/gems/1.8/gems/sqlite-2.0.1 for inspection.  
Results logged to  
/usr/local/lib/ruby/gems/1.8/gems/sqlite-2.0.1/ext/gem\_make.out

Sorry Im just new to this osx environment, and never seen these errors  
before

Thanks

---

<div class="post-metadata">

**Author:** ![devrubygem](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ac8455/32.png) [@devrubygem](https://www.ruby-forum.com/u/devrubygem)\
**Post date:** [April 14, 2009, 11:19am UTC](https://www.ruby-forum.com/t/gem-install-rails-issue/165455/4 "2009-04-14T11:19:01Z")

</div>

try: sudo gem install sqlite3

On Apr 13, 7:32 pm, Zayd C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
