Что такое sqlite заголовки разработки и как установить их?

Смотрите в драгоценный камень FasterCSV .

, Если все Вам нужно, поддержка Excel, Вы могли бы также изучить генерацию xls непосредственно. (См. электронную таблицу:: Excel)

gem install fastercsv
gem install spreadsheet-excel

я нахожу эти опции хорошими для открытия файла CSV в Windows Excel:

FasterCSV.generate(:col_sep => ";", :row_sep => "\r\n") { |csv| ... }

Что касается части ActiveRecord, что-то вроде этого сделало бы:

CSV_FIELDS = %w[ title created_at etc ]
FasterCSV.generate do |csv|
  Entry.all.map { |r| CSV_FIELDS.map { |m| r.send m }  }.each { |row| csv << row }
end

11
задан Verrtex 22 September 2009 в 20:57
поделиться

2 ответа

pysqlite needs to compiled/build before you can use it. This requires C language header files (*.H) which come with the source code of sqllite itself.

i.e. sqllite and pysqlite are two different things. Did you install sqlite prior to trying and build pysqllte ? (or maybe you did, but did you do so just with the binaries; you need the source package (or at least its headers) for pysqlite purposes.

0
ответ дан 3 December 2019 в 04:13
поделиться

debian/ubuntu:

$ apt-get install libsqlite3-dev # or rpm -i sqlite-devel-something.rpm

I think a number of interpreters just recompile their small connection libraries on installation, but to do that they need the C .h files in addition to the library to link against. You may already have the library, because something else depended on it, but you don't necessarily have the dev package, which is kind of half-way between source and binary.

Part of it is straightforward, if you are going to develop with a library you need its interface headers.

But I think something more happened, at first, people tried all-source and all-binary distributions, but the all-binary ones were vulnerable to dependency hell, and the all-source ones were overkill. I think now that an interesting compromise is in use, a semi-source distribution where a program links to installed libraries by recompiling those parts of it that link to extension libraries. This makes a lot of sense with interpreters where most of the system can arrive in binary but the extension modules are dynamically loaded and compiled for the installed system. I think.

18
ответ дан 3 December 2019 в 04:13
поделиться
Другие вопросы по тегам:

Похожие вопросы: