I am upgrading to Rails 3.0, but am having a difficult time getting it to boot. I have a custom asset host class that passes the name of the asset host into its constructor. I set this class in each of the environment configuration file. For instance, in development.rb, I have: ActionController::Base.asset_host = AssetHostingWithSsl.new("http:// asset%d.awesomeapp.local") However, when trying to get rails to load, I get the following error: "uninitialized constant AssetHostingWithSsl (NameError)" I have asset_hosting_with_ssl.rb with the class definition in the lib directory, which should be in the load path. Any ideas? -- 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.
On 2 September 2010 02:32, Kyle <kyle.e.crum-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I am upgrading to Rails 3.0, but am having a difficult time getting it > to boot. I have a custom asset host class that passes the name of the > asset host into its constructor. I set this class in each of the > environment configuration file. For instance, in development.rb, I > have: > > ActionController::Base.asset_host = AssetHostingWithSsl.new("http:// > asset%d.awesomeapp.local") > > However, when trying to get rails to load, I get the following error: > > "uninitialized constant AssetHostingWithSsl (NameError)" > > I have asset_hosting_with_ssl.rb with the class definition in the lib > directory, which should be in the load path. > > Any ideas?As of Rails 3, the lib directory isn''t autoloaded. You can either require the file manually where you need it, or tell Rails to autoload lib (in environment.rb), or create a new directory for autoloaded files tell Rails to autoload that. Chris -- 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Ok, thanks. I think I''ll put it in an initializer, actually, as that''s where it seems most of the configuration is headed to. On Sep 2, 3:11 pm, Chris Mear <chrism...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 2 September 2010 02:32, Kyle <kyle.e.c...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > I am upgrading to Rails 3.0, but am having a difficult time getting it > > to boot. I have a custom asset host class that passes the name of the > > asset host into its constructor. I set this class in each of the > > environment configuration file. For instance, in development.rb, I > > have: > > > ActionController::Base.asset_host= AssetHostingWithSsl.new("http:// > > asset%d.awesomeapp.local") > > > However, when trying to get rails to load, I get the following error: > > > "uninitialized constant AssetHostingWithSsl (NameError)" > > > I have asset_hosting_with_ssl.rb with the class definition in the lib > > directory, which should be in the load path. > > > Any ideas? > > As of Rails 3, the lib directory isn''t autoloaded. You can either > require the file manually where you need it, or tell Rails to autoload > lib (in environment.rb), or create a new directory for autoloaded > files tell Rails to autoload that. > > Chris-- 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.