Using activeresource in the model

17 views
Skip to first unread message

Jose Ernesto Suarez

unread,
Oct 31, 2011, 1:57:56 PM10/31/11
to monkeybars-mvc
Hi,

I´m trying to start in monkeybars, and this is my first trouble.I´m
trying to add active_resource support in my model but I can´t. I
followed up the resource https://github.com/monkeybars/monkeybars-core/wiki/Use-ruby-gems-in-your-application
with no luck, when I try to build my project launches this exception:

Error in application
Java::OrgJrubyExceptions::RaiseException - (LoadError) no such file to
load -- active_resource

Any suggestion?

James Britt

unread,
Nov 1, 2011, 5:52:18 PM11/1/11
to monkeyb...@googlegroups.com
Jose Ernesto Suarez wrote:
> Hi,
>
> I�m trying to start in monkeybars, and this is my first trouble.I�m
> trying to add active_resource support in my model but I can�t. I
> followed up the resource https://github.com/monkeybars/monkeybars-core/wiki/Use-ruby-gems-in-your-application

I have to check if that is still valid.

> with no luck, when I try to build my project launches this exception:
>
> Error in application
> Java::OrgJrubyExceptions::RaiseException - (LoadError) no such file to
> load -- active_resource

Wehere exactly di you extract the gem to, and how exactly are you
requiring it in your code?


>
> Any suggestion?
>

Make sure you are adding the complete relative folder path with your
extracted gem files to $:.


--

jamesbritt.com - Playing with Better Toys
neurogami.com - Smart application development
azhackers.com - Feed your head. Hack your world.

Jose Ernesto Suarez Font

unread,
Nov 2, 2011, 4:24:54 AM11/2/11
to monkeyb...@googlegroups.com

El 01/11/2011, a las 22:52, James Britt escribió:

> Jose Ernesto Suarez wrote:
>> Hi,

>> I惴 trying to start in monkeybars, and this is my first trouble.I惴
>> trying to add active_resource support in my model but I can愒. I


>> followed up the resource https://github.com/monkeybars/monkeybars-core/wiki/Use-ruby-gems-in-your-application
>
> I have to check if that is still valid.
>

Ok..

>> with no luck, when I try to build my project launches this exception:
>> Error in application
>> Java::OrgJrubyExceptions::RaiseException - (LoadError) no such file to
>> load -- active_resource
>
>
>
> Wehere exactly di you extract the gem to, and how exactly are you requiring it in your code?

I´m extract the gem and its dependencies in the lib/ruby directory removing any version info in the directory name, and i´m requiring it in the model as :
require 'rubygems'
require 'active_resource'

>
>
>> Any suggestion?
>
> Make sure you are adding the complete relative folder path with your extracted gem files to $:.

Are you referring to this?

when Monkeybars::Resolver::IN_JAR_FILE
# Files to be added only when run from inside a jar file
add_to_load_path "activeresource/lib"
add_to_load_path "activemodel/lib"
add_to_load_path "i18n/lib"
add_to_load_path "activesupport/lib"
add_to_load_path "multi_json/lib"
end
>

Regards,

Jose Ernesto Suarez
UPV- PoLinuX
http://www.polinux.upv.es

Reply all
Reply to author
Forward
0 new messages