Comments (5)
The only place .get is called in the DBF code is when trying to read a memo
field. I'm guessing you are using a dbf file that should have a memo file,
but the memo file is missing. Could that be the case?
On Sat, Jun 22, 2013 at 8:47 PM, Stephen Silber [email protected]:
I have written a rake task to import from a dbf file into my current rails
application but have run into a strange bug.desc "Import brothers"
task :import_brothers => :environment do
bro_db = DBF::Table.new("bro.dbf")
bros = bro_db.find(:all)bros.each do |brother| b = Brother.new b.last_name = brother["L_NAME"] unless brother["L_NAME"].nil?
I receive the error undefined method `get' for nil:NilClass
The strange part is that I can p bros.first and see that there is a column
named L_NAME and I created a fresh rails project with the same gemfile and
same schema for "brother" and it ran fine. Any ideas?—
Reply to this email directly or view it on GitHubhttps://github.com//issues/54
.
from dbf.
That sounds likely, could you possibly elaborate a little bit on how I can fix this situation? I don't regularly work with DBF but it's the only format my database is available in
from dbf.
The memo file should be the same name as the dbf file, but with an
extension of .dbt or .fpt instead of .dbf. Make sure the file is in the
same directory with the .dbf file.
On Sat, Jun 22, 2013 at 10:50 PM, Stephen Silber
[email protected]:
That sounds likely, could you possibly elaborate a little bit on how I can
fix this situation? I don't regularly work with DBF but it's the only
format my database is available in—
Reply to this email directly or view it on GitHubhttps://github.com//issues/54#issuecomment-19869517
.
from dbf.
I just released v2.0.4 which forces memo fields to return nil if the memo file is missing.
from dbf.
Very helpful, thank you so much!
from dbf.
Related Issues (20)
- Wrong colum names after upgrading from 4.1.6 to 4.2.0 or later HOT 4
- SyntaxError: /usr/local/bundle/gems/dbf-4.3.1/lib/dbf/schema.rb:40: syntax error, unexpected ')' HOT 2
- Cyrillic UTF-8 columns & data fails with "column name cannot be empty" HOT 5
- Possible mistake in the supported data types documentation HOT 1
- NoMethodError: undefined method `unpack` for nil:NilClass HOT 4
- Date Parsing Issue HOT 3
- Column Name with Capitalize HOT 2
- Invalid date values HOT 2
- working with DBF::Table in parallel processes HOT 1
- Can be installed on ruby < 2.4 HOT 1
- How is the default encoding chosen? HOT 2
- File causes TypeError HOT 4
- dBASE II (version 0x02) support HOT 2
- CLI tool clean exit on EPIPE HOT 2
- Repo issue: rdoc.info link is 404 HOT 1
- column name cannot be empty (DBF::Column::NameError) HOT 1
- Column name cannot be empty (DBF::Column::NameError) HOT 4
- CLI performance HOT 4
- Encoding 69 HOT 1
- no implicit conversion of nil into String
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dbf.