On Wed, Aug 11, 2010 at 5:09 PM, Lindsay Morris <lmorris...@gmail.com>wrote:

> Jim, when I added "config.gem ..", the app wouldn't start; complained "gem
> not installed".
> Which makes sense since there's no vendor/extensions/forms directory.
>

You misunderstand. It would say "gem not installed" if the user trying to
start the application didn't have access to that gem.


>
> Trying Anna's advice:
>    script/extension install forms
> fails: "git was compiled without libcurl support".
> I can't be root on this box.
>
> So I tried another installer:
>   git clone 
> git://github.com/squaretalent/radiant-forms-extensionvendor/extensions/forms
> That seemed happy, and I now have a vendor/extensions/forms directory.
> Yay!
> Then:
>
> rake radiant:extensions:forms:migrate
>
> blew up like this:
>
> rake radiant:extensions:forms:migrate
> (in /home/lindsay/rails_apps/radiant)
> no such file to load -- radiant-forms-extension
> /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
> `gem_original_require'
> /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
> <snip>
> /home/lindsay/rails_apps/radiant/config/environment.rb:13
> <snip>
>
> So I look at line 13 in my environment.rb, and it says (comments stripped):
> Radiant::Initializer.run do |config|
>   config.action_controller.session = {
>     :session_key => '_radiant_session',
>     :secret      => 'asdfdferfxcoivswqenadfasdfqewpfioutyqwel'
>
>   }
>   config.gem 'radiant-forms-extension'
> [more]
>
> More advice please?


If you have the extension in vendor/extensions, then there is no need for
the "config.gem" line.
If you have the gem installed, then you should not need the extension in
vendor/extensions.
These are 2 separate ways to install the extension:
- config.gem 'radiant-forms-extension' :lib => false
- or source in vender/extensions/forms

It sounds like you don't have things setup properly to use it as a gem.
Since you have the source in vendor/extensions/forms now, you should be able
to remove the config.gem line and be on your way.

When gems are loaded, radiant will look for a file of the same name in lib.
So if you install the "radiant-forms-extension" gem, the application will
look inside that code for a file in lib/radiant-forms-extension.rb. This
"radiant-forms-extension" gem doesn't have that file, so you'd tell radiant
not to look for it by typing: config.gem "radiant-forms-extension", :lib =>
false
Otherwise, if the file did exist in this gem, you wouldn't need :lib =>
false

Is this helpful?


>
>
>
> On Wed, Aug 11, 2010 at 12:42 PM, Jim Gay <j...@saturnflyer.com> wrote:
>
>> Please reread my previous reply.
>>
>> You've installed the gem and that's it. There is nothing telling your
>> application to use it.
>>
>>
>> On Wed, Aug 11, 2010 at 12:11 PM, Lindsay Morris <lmorris...@gmail.com>wrote:
>>
>>> I used hostgator's cpanel web interface to install it.
>>> There is no vendor/extensions/forms directory.
>>>
>>> So I ran "gem install radiant-forms-extension"; it seemed to work:
>>> [lind...@gator634 ~/rails_apps/radiant]$ gem install
>>> radiant-forms-extension
>>> Successfully installed radiant-forms-extension-2.0.1
>>> 1 gem installed
>>> Installing ri documentation for radiant-forms-extension-2.0.1...
>>> Installing RDoc documentation for radiant-forms-extension-2.0.1...
>>>
>>> But there's still no forms directory anywhere.
>>>
>>> [lind...@gator634 ~/rails_apps/radiant]$ find / -name forms
>>> /home/lindsay/ruby/gems/gems/radiant-forms-extension-2.0.1/spec/lib/forms
>>>
>>> /home/lindsay/ruby/gems/gems/radiant-forms-extension-2.0.1/app/views/admin/forms
>>> /home/lindsay/ruby/gems/gems/radiant-forms-extension-2.0.1/lib/forms
>>>
>>> /home/lindsay/ruby/gems/doc/radiant-forms-extension-2.0.1/rdoc/files/lib/forms
>>>
>>> /usr/lib/ruby/gems/1.8/doc/radiant-forms-extension-2.0.1/rdoc/files/lib/forms
>>> /usr/lib/ruby/gems/1.8/gems/radiant-forms-extension-2.0.1/spec/lib/forms
>>> /usr/lib/ruby/gems/1.8/gems/radiant-forms-extension-2.0.1/lib/forms
>>>
>>> /usr/lib/ruby/gems/1.8/gems/radiant-forms-extension-2.0.1/app/views/admin/forms
>>>
>>>
>>> Is it supposed to be "gems/gems" above (line 2)?
>>> Is it using the wrong directory? radiant starts from
>>> /home/lindsay/rails_apps/radiant.
>>>
>>> Maybe I need to tweak this line in my config/environment.rb BEFORE I run
>>> gem install?
>>> (It's commented out at present.)
>>>
>>> #ENV['GEM_PATH'] = '/home/lindsay/ruby/gems:/usr/lib/ruby/gems/1.8'
>>>
>>> Thanks for any advice...
>>>
>>>  On Wed, Aug 11, 2010 at 12:14 AM, Jim Gay <j...@saturnflyer.com> wrote:
>>>
>>>> Lindsay,
>>>>
>>>> How did you install the radiant-forms-extension? Was it just by doing
>>>> "gem install radiant-forms-extension"? And if so did you add
>>>> "config.gem 'radiant-forms-extension'" to your config/environment.rb?
>>>> If you did the first step but not the second, then you didn't "install" it
>>>> into your app.
>>>>
>>>
>>
>> --
>> Jim Gay
>> Saturn Flyer LLC
>> http://www.saturnflyer.com
>> 571-403-0338
>>
>
>
>
> --
> Lindsay Morris
>
>


-- 
Jim Gay
Saturn Flyer LLC
http://www.saturnflyer.com
571-403-0338

Reply via email to