google-code-export / globalite

Automatically exported from code.google.com/p/globalite
1 stars 0 forks source link

Rails 2.0.2 documentation #19

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
when I do everything by the book on os 10.5.2 using textmate on a normal 
sysconf using rails 
2.0.2, i get

/Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.
rb:266:in 
`load_missing_constant': uninitialized constant Globalite (NameError)
    from /Library/Ruby/Gems/1.8/gems/activesupport-
2.0.2/lib/active_support/dependencies.rb:453:in `const_missing'
    from /Library/Ruby/Gems/1.8/gems/activesupport-
2.0.2/lib/active_support/dependencies.rb:465:in `const_missing'
    from /Users/PPC/Documents/ror_projects/workflow-assistant/config/environment.rb:12
    from 
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems
/custo
m_require.rb:27:in `gem_original_require'
    from 
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems
/custo
m_require.rb:27:in `require'
    from /Library/Ruby/Gems/1.8/gems/activesupport-
2.0.2/lib/active_support/dependencies.rb:496:in `require'
    from /Library/Ruby/Gems/1.8/gems/activesupport-
2.0.2/lib/active_support/dependencies.rb:342:in `new_constants_in'
    from /Library/Ruby/Gems/1.8/gems/activesupport-
2.0.2/lib/active_support/dependencies.rb:496:in `require'
     ... 21 levels...
    from /Library/Ruby/Gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:39
    from 
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems
/custo
m_require.rb:27:in `gem_original_require'
    from 
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems
/custo
m_require.rb:27:in `require'
    from script/server:3

Original issue reported on code.google.com by julezedw...@gmail.com on 13 Feb 2008 at 5:09

GoogleCodeExporter commented 9 years ago
it looks like you don't have the plugin installed properly or something. I don't
believe it has anything to do with Rails 2.0.2

can you paste environment.rb:12  ?

-Matt

Original comment by mattAimo...@gmail.com on 28 Feb 2008 at 10:33

GoogleCodeExporter commented 9 years ago
Hello Matt,

First of all, thanks for the initiative of making a lite globalization plugin.

I've tried to install the Globalite plugin in my little rails application 
following
those steps:

===installation:

    script/plugin install http://globalite.googlecode.com/svn/trunk/
rename the vendor/plugins/trunk => vendor/plugins/globalite

...

Declare the current locale or language in your environment.rb > 
    Globalite.language = :fr

Unfortunately when i started the application I've got this error:

# ruby script/server -p 2000
=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
=> Rails application starting on http://0.0.0.0:2000
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Starting Mongrel listening at 0.0.0.0:2000
** Starting Rails with development environment...
Exiting
/var/lib/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:26
6:in
`load_missing_constant': uninitialized constant Globalite (NameError)
        from
/var/lib/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:45
3:in
`const_missing'
        from
/var/lib/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:46
5:in
`const_missing'
        from /home/anderson/Workspaces/cellshop/config/environment.rb:59
        from /var/lib/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:47:in `run'
        from /home/anderson/Workspaces/cellshop/config/environment.rb:13
        from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
        from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `require'
        from
/var/lib/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:49
6:in
`require'
         ... 23 levels...
        from /var/lib/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:39
        from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
        from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `require'
        from script/server:3

I've tried to google for that and looks like this is the only place where the 
problem
is reported and no solution was pointed so far.

I've found the problem to be that you need to append that "Globalite.language = 
:fr"
to the very end of the environment.rb and not anywhere else. I don't know if 
this is
too basic to a average rails developers to elaborate more but for someone like 
me
(really newbie on RoR) was not the default understanding.

I'd suggest that you clear a little bit the instructions by emphasizing this
particular need of adding it to the bottom.

Thanks!

Original comment by pfagi...@gmail.com on 6 Mar 2008 at 12:15

GoogleCodeExporter commented 9 years ago

Original comment by mattAimo...@gmail.com on 23 May 2008 at 8:40

GoogleCodeExporter commented 9 years ago
I ran across the same problem (with latest git sources), but then realized I 
just
forget to restart my Mongrel server...  Silly, I know, but I'm posting this 
here in
case it saves the next silly person a couple of minutes of head-scratching...

Original comment by asaf.bartov on 9 Aug 2008 at 2:54

GoogleCodeExporter commented 9 years ago
I ran in the same problem and I can't solve it...

Original comment by mbuia...@gmail.com on 12 Aug 2008 at 8:23