Active Record

I'm trying to develop a small database application using Ruby 2.3.1, the
gem activerecord-5.0.0.1 (part of the Ruby package), and the sql3 database
system that comes with the Mac (I don't want to use Rails, only active
record).

The beginning of the program goes like this:

require 'sqlite3'
require 'active_record'

db_config = {
    'adapter' => 'sqlite3',
    'database' => 'test.db'
}

ActiveRecord::Base.establish_connection(db_config)

In RubyMine, I get all kinds of warning that don't mean much to me, and I'm
not going anywhere.

Question: How do I put together a simple database project only using Ruby,
Active Record, and sql3? (I've read everything I could online already, so
please don't tell me to google it).

Well, yeah, absolutely agree -- you're not going anywhere by saying
"Help, I have a problem but I won't tell you what it is" :grinning:

···

On Sat, Aug 12, 2017 at 5:32 PM, Marc Chanliau <marc.chanliau@gmail.com> wrote:

I'm trying to develop a small database application using Ruby 2.3.1, the gem
activerecord-5.0.0.1 (part of the Ruby package), and the sql3 database

In RubyMine, I get all kinds of warning that don't mean much to me, and I'm
not going anywhere.

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote

What is the error you are getting? That's generally the 2nd thing you want
to provide.

···

On Sat, Aug 12, 2017, 6:27 PM Hassan Schroeder <hassan.schroeder@gmail.com> wrote:

On Sat, Aug 12, 2017 at 5:32 PM, Marc Chanliau <marc.chanliau@gmail.com> > wrote:
> I'm trying to develop a small database application using Ruby 2.3.1, the
gem
> activerecord-5.0.0.1 (part of the Ruby package), and the sql3 database

> In RubyMine, I get all kinds of warning that don't mean much to me, and
I'm
> not going anywhere.

Well, yeah, absolutely agree -- you're not going anywhere by saying
"Help, I have a problem but I won't tell you what it is" :grinning:

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

--

- Raj

Raj, the error I was getting was that sqlite3 was not found. I realized the
gem was not installed. I installed it and "required" it, but I still get
the error. Anyway, no sweat, I'll find out.

BTW, I thought this list was supposed to be helpful. Next time I'll post to
stack overflow to avoid the arrogance of some around here.

···

On Sat, Aug 12, 2017 at 7:25 PM, Raj Sahae <rajsahae@gmail.com> wrote:

What is the error you are getting? That's generally the 2nd thing you want
to provide.

On Sat, Aug 12, 2017, 6:27 PM Hassan Schroeder <hassan.schroeder@gmail.com> > wrote:

On Sat, Aug 12, 2017 at 5:32 PM, Marc Chanliau <marc.chanliau@gmail.com> >> wrote:
> I'm trying to develop a small database application using Ruby 2.3.1,
the gem
> activerecord-5.0.0.1 (part of the Ruby package), and the sql3 database

> In RubyMine, I get all kinds of warning that don't mean much to me, and
I'm
> not going anywhere.

Well, yeah, absolutely agree -- you're not going anywhere by saying
"Help, I have a problem but I won't tell you what it is" :grinning:

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

--

- Raj

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

If posting a vague open-ended question without a reproducible code
example *and exact error messages* on Stack Overflow gets you
better results, go for it.

It's "arrogance" to post a request for help to a mailing list of thousands
of people without providing real information to enable them to help.

See also: http://www.catb.org/esr/faqs/smart-questions.html

P.S. For the record, the snippet you posted had no errors -- I used it,
verbatim, to connect to a Sqlite3 DB using Active Record...

Good luck,

···

On Sat, Aug 12, 2017 at 10:10 PM, Marc Chanliau <marc.chanliau@gmail.com> wrote:

BTW, I thought this list was supposed to be helpful. Next time I'll post to stack overflow to avoid the arrogance of some around here.

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote

Marc,

Try running the file from the command line to make sure it's not an issue
with RubyMine.

If the issue persists, run `gem list | grep sqlite3` to make sure its
install was successful.

Finally, please consider pasting the error messages verbatim into your
emails or into your Stack Overflow questions. It's very difficult to help
you otherwise.

Best,
Alex

···

On Sun, Aug 13, 2017 at 8:10 AM, Marc Chanliau <marc.chanliau@gmail.com> wrote:

Raj, the error I was getting was that sqlite3 was not found. I realized
the gem was not installed. I installed it and "required" it, but I still
get the error. Anyway, no sweat, I'll find out.

BTW, I thought this list was supposed to be helpful. Next time I'll post
to stack overflow to avoid the arrogance of some around here.

On Sat, Aug 12, 2017 at 7:25 PM, Raj Sahae <rajsahae@gmail.com> wrote:

What is the error you are getting? That's generally the 2nd thing you
want to provide.

On Sat, Aug 12, 2017, 6:27 PM Hassan Schroeder < >> hassan.schroeder@gmail.com> wrote:

On Sat, Aug 12, 2017 at 5:32 PM, Marc Chanliau <marc.chanliau@gmail.com> >>> wrote:
> I'm trying to develop a small database application using Ruby 2.3.1,
the gem
> activerecord-5.0.0.1 (part of the Ruby package), and the sql3 database

> In RubyMine, I get all kinds of warning that don't mean much to me,
and I'm
> not going anywhere.

Well, yeah, absolutely agree -- you're not going anywhere by saying
"Help, I have a problem but I won't tell you what it is" :grinning:

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org
?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

--

- Raj

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;