I use Gloc plugin to create some localisation and it works great on my
local webbrick server. Unfortunately It doesn’t work anymore when I
upload the gloc dir to vendor/plugins on my host. I always get this
error:
“uninitialized constant GLoc”
The error occures when environment.rb is executing this:
Sounds like the plugin isn’t being initialised. So you’re sure it’s in
vendor/plugins/gloc/* ?
Maybe you should modify gloc’s init.rb and just add a line to output
loaded or something so that you know if it’s being called or not. Ur
host might’ve set things up differently somehow (?). If it’s not being
called you could just manually add it to the load path and require it.
I’m happy that you replied so quick :). I’m absolutely sure it’s in
vendor/plugins/gloc . I’m a rails newbie so I’m not sure how I can
output
something from the init.rb. I can’t do puts ‘blablabla’ because I won’t
be able
to see server output with my dreamhost account. So then I tried to to
add this in my environment.rb :
Hmm, it’s really wierd that other plugins are loading but GLoc isn’t…
ok, try just adding the gloc paths to the load path and manually
require it then. Again it’s very odd that that’s happening.
And also u can u can just use puts to see if the init file is being
loaded but you can output text to a file and check that instead. good
luck
Golly
I tried everything you said but it still doesn’t work :(. I could give
you temporary acces to my files so you could take a quick look at it. I
would really appreciate it if you want to do this. Let me know something
and I’ll e-mail you a login and passw. I’ll create simple gloc test
controller & view so you can see it doesn’t work.
Hmm, it’s really wierd that other plugins are loading but GLoc isn’t…
ok, try just adding the gloc paths to the load path and manually
require it then. Again it’s very odd that that’s happening.
And also u can u can just use puts to see if the init file is being
loaded but you can output text to a file and check that instead. good
luck
Do you have the following in your
RAILS_ROOT/vendor/plugins/gloc/init.rb
require ‘gloc’
require ‘gloc-ruby’
require ‘gloc-rails’
require ‘gloc-rails-text’
Bill Davenport wrote:
The error occures when environment.rb is executing this:
Do you have the following in your
RAILS_ROOT/vendor/plugins/gloc/init.rb
require ‘gloc’
require ‘gloc-ruby’
require ‘gloc-rails’
require ‘gloc-rails-text’
Do you have the following in your
RAILS_ROOT/vendor/plugins/gloc/init.rb
require ‘gloc’
require ‘gloc-ruby’
require ‘gloc-rails’
require ‘gloc-rails-text’
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.