Two Separate Issues: rails generate

Hi folks.

I am just starting rails and have two current issues. I have installed everything, I think, and (first) I'm having permissions feedback upon rails generate:

$ rails generate /Library/Ruby/Gems/1.8/gems/railties-3.1.0/lib/rails/script_rails_loader.rb:11: warning: Insecure world writable dir /Library/WebServer/Documents in PATH, mode 040777 /Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/runtime.rb:136: warning: Insecure world writable dir /Library/WebServer/Documents in PATH, mode 040777

I set my project folder permissions to -R 777 to alleviate permissions issues. But, it's giving me this.

What are the proper permissions for a /Library/WebServer/Documents/project1/ directory?

Second, I seem to be having some mysql2 gem issues.

/Library/Ruby/Gems/1.8/gems/mysql2-0.3.7/lib/mysql2/mysql2.bundle: dlopen(/Library/Ruby/Gems/1.8/gems/mysql2-0.3.7/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib (LoadError)   Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.3.7/lib/mysql2/mysql2.bundle   Reason: image not found - /Library/Ruby/Gems/1.8/gems/mysql2-0.3.7/lib/mysql2/mysql2.bundle   from /Library/Ruby/Gems/1.8/gems/mysql2-0.3.7/lib/mysql2.rb:9   from /Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/runtime.rb:68:in `require'   from /Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/runtime.rb:68:in `require'   from /Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/runtime.rb:66:in `each'   from /Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/runtime.rb:66:in `require'   from /Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/runtime.rb:55:in `each'   from /Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/runtime.rb:55:in `require'   from /Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler.rb:120:in `require'   from /Library/WebServer/Documents/simple_cms/config/application.rb:7   from /Library/Ruby/Gems/1.8/gems/railties-3.1.0/lib/rails/commands.rb:21:in `require'   from /Library/Ruby/Gems/1.8/gems/railties-3.1.0/lib/rails/commands.rb:21   from script/rails:6:in `require'   from script/rails:6


- I have 64 bit mysql installed. Server version: 5.5.16 MySQL Community Server (GPL) for MacBook (INtel Core 2 Duo)

- root password was changed, but there is nothing in the database.yml corresponding to the root password. I am assuming this is the account that's being used. Should I change that?

- the mysql2 gem is installed:

$ gem list

*** LOCAL GEMS ***

actionmailer (3.1.0) actionpack (3.1.0) activemodel (3.1.0) activerecord (3.1.0) activeresource (3.1.0) activesupport (3.1.0) arel (2.2.1) bcrypt-ruby (3.0.1) builder (3.0.0) bundler (1.0.18) coffee-rails (3.1.1) coffee-script (2.2.0) coffee-script-source (1.1.2) erubis (2.7.0) execjs (1.2.6) hike (1.2.1) i18n (0.6.0) jquery-rails (1.0.14) json (1.6.0) mail (2.3.0) mime-types (1.16) multi_json (1.0.3) mysql2 (0.3.7) polyglot (0.3.2) rack (1.3.3) rack-cache (1.0.3) rack-mount (0.8.3) rack-ssl (1.3.2) rack-test (0.6.1) rails (3.1.0) railties (3.1.0) rake (0.9.2) rdoc (3.9.4) rubygems-update (1.8.10) sass (3.1.7) sass-rails (3.1.2) sprockets (2.0.0) thor (0.14.6) tilt (1.3.3) treetop (1.4.10) tzinfo (0.3.29) uglifier (1.0.3)

I tried with the following as well, and it still produces the same result:

sudo gem install mysql2 -- --with-mysql-config=/usr/local/mysql-5.5.16-osx10.6-x86_64/bin/mysql_config

This is on OS X Lion 10.7.1. Any help appreciated.