Git Product home page Git Product logo

Comments (6)

sj26 avatar sj26 commented on May 5, 2024

I'm having trouble replicating this issue. This is working fine on my machine:

$ irb -r mail_catcher
irb> MailCatcher::Mail.add_message <your gisted message hash>
=> nil
irb> MailCatcher::Mail.messages
=> [{"id"=>1, "sender"=>"...", "recipients"=>["..."], "subject"=>"...", "size"=>"...", "created_at"=>...}]

What version of ruby and sqlite3 are you using? Perhaps it's something in there. The exception is unforunately not very descriptive, and googling reveals it's fairly generic, but usually it means the database is missing. Considering this is an in-memory database it should never be missing. :-/

On my machine:

$ ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.3.0]
$ sqlite3 --version
3.7.10 2012-01-16 13:28:40 ebd01a8deffb5024a5d7494eef800d2366d97204

from mailcatcher.

sandersch avatar sandersch commented on May 5, 2024
$ ruby -v
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux]
$ sqlite3
SQLite version 3.3.6

Can you recommend a good way for me to further dig into the cause of the issue?

from mailcatcher.

sandersch avatar sandersch commented on May 5, 2024

I was able to solve this issue by upgrading sqlite to version 3.6. I am closing this since it isn't really an issue with mailcatcher but you may want to add a note that sqlite 3.3 isn't supported.

from mailcatcher.

 avatar commented on May 5, 2024

I wish you may re-open this issue because it is not a bug of sqlite.
Older version of sqlite do not support multi-threading, which is used in mailcatcher. (? please confirm if yes)

I tried two SMTP connection, the first can send, and the second fail, because the resource is still locked by the first one.

I am able to patch if compatible with sqllite 3.3, by simple stupid closing all sqlite query and connection after use, and reopen them for everytime.

from mailcatcher.

sj26 avatar sj26 commented on May 5, 2024

Mailcatcher is not multithreaded, there is a single reactor thread in EventMachine (afaict).

If you can provide a script replicating the issue I'll happily reopen and investigate.

from mailcatcher.

 avatar commented on May 5, 2024

I have no testcase for you but something different.

As I need it work for me now.
I did some hotfix on mail.rb to "make to works" (and dirty) on my Centos 5.2, sqlite3 3.3.6 and ruby1.9.3.
http://pastebin.com/81TG21GQ

There are some rewrite and I am sure it is buggy and leak. But at least it works.

from mailcatcher.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.