Error created with using "script/generate" command

When attempting to create some Rails components using below command, I
receive
the following errors:

[root@localhost blog]# rake db:create
(in /root/work/blog)
db/development.sqlite3 already exists
[root@localhost blog]# script/generate controller home index
/usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.5/lib/initializer.rb:
271:in rescue in require_frameworks': no such file to load -- openssl (RuntimeError) from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.5/lib/ initializer.rb:268:inrequire_frameworks’
from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.5/lib/
initializer.rb:134:in process' from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.5/lib/ initializer.rb:113:inrun’
from /root/work/blog/config/environment.rb:9:in <top (required)>' from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.5/lib/ commands/generate.rb:1:inrequire’
from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.5/lib/
commands/generate.rb:1:in <top (required)>' from script/generate:3:inrequire’
from script/generate:3:in `’

Suggestions for resolution? - GregN

On Tue, Mar 16, 2010 at 10:40 AM, GregN [email protected] wrote:

When attempting to create some Rails components using below command, I
receive
the following errors:

[root@localhost blog]# rake db:create
(in /root/work/blog)
db/development.sqlite3 already exists

Not an error, it means exactly what it says.

But, as an aside, why in the name of #{DEITY} are you doing this
as root?? Seems like a really dicey idea…

[root@localhost blog]# script/generate controller home index
/usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.5/lib/initializer.rb:
271:in `rescue in require_frameworks’: no such file to load – openssl
(RuntimeError)

So was your version of Ruby built with OpenSSL?


Hassan S. ------------------------ [email protected]
twitter: @hassan