Groups
Groups
Sign in
Groups
Groups
Ruby on Rails: Talk
Conversations
About
Send feedback
Help
data file path in a gem
8 views
Skip to first unread message
Erwin
unread,
Apr 30, 2012, 6:33:48 AM
4/30/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ruby on Rails: Talk
I am trying to access a data list from inside a gem code, how should I
set the file path ..
here is my gem file structure :
>> my_extension
--- my_extension.gemspec
--- Gemfile
--- Gemfile.lock
>> lib
>> my_extension
--- code_a.rb
--- code_b.rb
--- code_c.rb
--- my_extension.rb
>> my_data
--- data.yml
from inside code_a.rb, I am trying to load an array from the
data.yml : data = YAML::load(File.open("data.yml"))
how should I set the path ??
thanks for feedback
Reply all
Reply to author
Forward
0 new messages