Hello Rails community,
I create a new project with rails 2.x.y.> rails micro_project
Then
> cd micro_project
An then I try to enter into console:
>script/console
and rails throws following ugly error:
/home/eugenc/.rvm/gems/ruby-1.9.2-p0@rails238/gems/actionmailer-2.3.8/lib/action_mailer.rb:52:in
`<top (required)>'': Text is not a module (TypeError)
from <internal:lib/rubygems/custom_require>:29:in
`require''
from <internal:lib/rubygems/custom_require>:29:in
`require''
from
/home/eugenc/.rvm/gems/ruby-1.9.2-p0@rails238/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in
`block in require''
from
/home/eugenc/.rvm/gems/ruby-1.9.2-p0@rails238/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in
`new_constants_in''
from
/home/eugenc/.rvm/gems/ruby-1.9.2-p0@rails238/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in
`require''
from
/home/eugenc/.rvm/gems/ruby-1.9.2-p0@rails238/gems/rails-2.3.8/lib/initializer.rb:268:in
`block in require_frameworks''
from
/home/eugenc/.rvm/gems/ruby-1.9.2-p0@rails238/gems/rails-2.3.8/lib/initializer.rb:268:in
`each''
from
/home/eugenc/.rvm/gems/ruby-1.9.2-p0@rails238/gems/rails-2.3.8/lib/initializer.rb:268:in
`require_frameworks''
from
/home/eugenc/.rvm/gems/ruby-1.9.2-p0@rails238/gems/rails-2.3.8/lib/initializer.rb:134:in
`process''
from
/home/eugenc/.rvm/gems/ruby-1.9.2-p0@rails238/gems/rails-2.3.8/lib/initializer.rb:113:in
`run''
from
/home/eugenc/Dropbox/lab/sandbox/micro_project/config/environment.rb:9:in
`<top (required)>''
from <internal:lib/rubygems/custom_require>:29:in
`require''
from <internal:lib/rubygems/custom_require>:29:in
`require''
from
/home/eugenc/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/irb/init.rb:281:in
`block in load_modules''
from
/home/eugenc/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/irb/init.rb:279:in
`each''
from
/home/eugenc/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/irb/init.rb:279:in
`load_modules''
from
/home/eugenc/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/irb/init.rb:20:in
`setup''
from
/home/eugenc/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/irb.rb:53:in
`start''
from /home/eugenc/.rvm/rubies/ruby-1.9.2-p0/bin/irb:17:in
`<main>''
I have tried lot of combinations of version with rvm and gemsets:
ruby 1.8.7, rails 2.3.5 then ruby 1.8.7 2.3.8 and again I repeted
process for ruby 1.9.2 and every time I got an error when I want to
enter into script/console in newly created project with respective rails
version.
For example:
>rvm 1.8.7@rails235
>rails -v
Rails 2.3.5>rails cat_project_235
>cd cat_project_235/
cat_project_235$ script/console
Loading development environment (Rails 2.3.5)
/home/eugenc/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:89:in
`read'':TypeError: can''t convert Hash into Integer
/home/eugenc/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:89:in
`read'':TypeError: can''t convert Hash into Integer
/home/eugenc/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:89:in
`read'':TypeError: can''t convert Hash into Integer
ruby-1.8.7-p302 >
This time I got console prompt by as you see, another anoying error.
Another example with ruby 1.8.7 and newly installed rails 2.3.8 and
newly created project in rails 2.3.8
rvm gemset create rails238
info: Gemset ''rails238'' created.> rvm 1.8.7@rails238
> gem install rails -v 2.3.8 --no-rdoc --no-ri
Successfully installed activesupport-2.3.8
Successfully installed activerecord-2.3.8
Successfully installed rack-1.1.0
Successfully installed actionpack-2.3.8
Successfully installed actionmailer-2.3.8
Successfully installed activeresource-2.3.8
Successfully installed rails-2.3.8
7 gems installed
> rails cat_project_238
>cd cat_project_238
> script/server
=> Booting WEBrick
=> Rails 2.3.8 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2010-10-26 14:28:05] INFO WEBrick 1.3.1
[2010-10-26 14:28:05] INFO ruby 1.8.7 (2010-08-16) [i686-linux]
^CExiting> script/console
Loading development environment (Rails 2.3.8)
/home/eugenc/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:89:in
`read'':TypeError: can''t convert Hash into Integer
/home/eugenc/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:89:in
`read'':TypeError: can''t convert Hash into Integer
/home/eugenc/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:89:in
`read'':TypeError: can''t convert Hash into Integer
ruby-1.8.7-p302 >
As you can see - server starts ok, but script/console again same
error...
If I leave rvm and use system default ruby with:
script/about
About your application''s environment
Ruby version 1.8.7 (i486-linux)
RubyGems version 1.3.5
Rack version 1.0
Rails version 2.3.5
Active Record version 2.3.5
Active Resource version 2.3.5
Action Mailer version 2.3.5
Active Support version 2.3.5
Application root /home/eugenc/Dropbox/lab/sandbox/cat_rails235
Environment development
Database adapter sqlite3
Then>script/console
Loading development environment (Rails 2.3.5)
/var/lib/gems/1.8/gems/actionmailer-2.3.5/lib/action_mailer.rb:52:TypeError:
Text is not a module
/home/eugenc/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:443:in
`load_missing_constant'':NameError: uninitialized constant
ApplicationController>> User.find(:all)
NameError: uninitialized constant User
from
/home/eugenc/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:443:in
`load_missing_constant''
from
/home/eugenc/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in
`const_missing''
from
/home/eugenc/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in
`const_missing''
from (irb):1>>
Again error! did someone had similar issue? I just need to fix my old
2.3.5 rails project, but I am unable to do the simplest - to enter into
console :(
Please help!
Did someone had similar issue?
Can someone suggest me
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.