Conversation started Dec 15, 2016 at 22:24.
Dec 15, 2016 22:24
If there's anything I can help with, I can in about an hour
I don't know Ruby though
@Undo I was debating whether I had time, but probably not
@NobodyNada that's probably a limiting factor, really
given that the entire thing is Ruby
well
@NobodyNada Art didn't either until... what, a few months ago?
I learned Ruby on a consulting project. It's really not that hard.
@Undo look up my first MS commit, and I learned it about a week before that
mid-January this year
I could git clone MS and try to figure it out
@NobodyNada Note that if you're on Windows, it's a little bit harder.
Dec 15, 2016 22:26
I'm on Mac
^
as in much harder
@NobodyNada oh, then it's fine. Clone away.
as in you need a Linux VM to be anywhere near productive
"a little bit"
I can walk you through getting it set up.
I wonder if it works without a db dump
@Undo Yes, now that we have seeds
Dec 15, 2016 22:27
@ArtOfCode Oh, sweet. You've tested them from scratch?
the only thing that didn't before now was not having a SmokeDetector record, but you can seed that in now
@Undo yeah, once about a month ago
yay
should be able to git clone, bundle install, db:schema:load, db:migrate, db:seed and you're ready to go
I know how to do the git clone part, but that's about it :p
@NobodyNada cd into the metasmoke directory
Dec 15, 2016 22:29
done
What's ruby --version say?
I forget what's bundled with OS X these days
ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
thanks for helping!
good enough, probably
I can update it with Homebrew
naa- by DavidPostill
Dec 15, 2016 22:30
actually, it requires 2.2.2+
probably want 2.3.0
@NobodyNada I'd recommend using rvm instead, makes things a little cleaner
seems to be more stable than the 2.2.x series
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
\curl -sSL https://get.rvm.io | bash -s stable --ruby=2.3.3
installing, thanks!
Dec 15, 2016 22:31
(yes the backslash is significant)
no idea what it does, but things break if you don't include it
Stack Overflow says it prevents the command from being aliased
[ SmokeDetector | MS ] Repeating characters in answer: Break inner foreach loop and continue outer foreach loop by Jeffrey Sall on stackoverflow.com (@dorukayhan)
tpu- by Undo
Calling that abusive/nonsense
Restart: API quota is 2449.
@Undo would installing ruby on rails be easier on windows 10, now that it comes with a subsystem for ubuntu? (its like a full blown ubuntu environment in windows, including sudo)
Dec 15, 2016 22:38
it failed to install it:
> There was an error while trying to resolve rubygems version for 'latest'.
Halting the installation.
> /Users/jonathan/.rvm/bin/rvm: line 66: shell_session_update: command not found
bash: line 850: shell_session_update: command not found
@NobodyNada What's the error?
whut
which is strange, since running shell_session_update works just fine in the terminal
What command did you run?
I'll try running the command again, and if that doesn't work I'll just use Homebrew.
\curl -sSL get.rvm.io | bash -s stable --ruby=2.3.3
hrmph
Yeah, go ahead and just use Brew. Won't hurt anything
Dec 15, 2016 22:40
I just ran the installer again; it completed in about a second and it works now
@Ferrybig yes, if that's in production now
ruby -v:
ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-darwin16]
dat'll work
gem install bundler next
You have some kind of awesome Internet connection
@NobodyNada bundle install, it should fail for some reason
Always does, then we just track down what it wants
Dec 15, 2016 22:42
I dunno, worked first time for me when I did a fresh clone
@Undo I think it's being faster than it usually is right now
@ArtOfCode Yeah, you already had the Nokogiri dependencies and such installed
it says I need to install mysql; I'm doing that right now with Homebrew
You're having a suspiciously smooth time of it
Dec 15, 2016 22:49
I think bundle install succeeded, but it gave me a bunch of information about Passenger and about configuration files
@NobodyNada About restarting it with touch?
You can ignore that stuff
yeah, that's what it is; thanks!
When you installed MySQL through Brew, did you follow up on mysql_secure_installation and such?
no; I didn't pay any attention
I probably should have
There should be some instructions that Brew threw at you, follow those to get MySQL set up
(it's possible to just use SQLite, but MySQL works better)
Dec 15, 2016 22:52
Should I install "VALIDATE PASSWORD PLUGIN"?
@NobodyNada Never heard of it, but it probably wouldn't hurt
your choice, leaving it off is probably fine
okay, done
Did Brew give you a root password for it?
I set up a password
kk
So now mysql -u root -p and it'll ask you for your password
Dec 15, 2016 22:54
ok
Once you're in, CREATE DATABASE metasmoke;
Followed by CREATE USER 'metasmoke'@'localhost' IDENTIFIED BY 'password';
Change password if you want, it doesn't matter much
Then GRANT ALL PRIVILEGES ON 'metasmoke'.* TO 'metasmoke'@'localhost';
FLUSH PRIVILEGES;
Dec 15, 2016 22:56
> ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''metasmoke'.* TO 'metasmoke'@'localhost'' at line 1
ugh
just a sec
GRANT ALL PRIVILEGES ON `metasmoke`.* TO `metasmoke`@`localhost`;
perhaps
(backticks)
that worked; thank you!
Could all of these steps get put in the MS wiki ?
@Andy I think we're generating one right now
Woot
Dec 15, 2016 22:58
@NobodyNada Now cntrl-d to exit MySQL
Inside the metasmoke folder (cli):
cd config; cp database.sample.yml database.yml
Open database.yml in your editor of choice.
Replace the development: section with something like this:
development:
  adapter: mysql2
  database: metasmoke
  encoding: utf8
  username: metasmoke
  password: yourpass
  host: 127.0.0.1
  port: 3306
Replacing yourpass with... your password, of course
Now, hypothetically, this should work:
In the metasmoke root, run:
Nope, not that (unless it worked, then it's fine)
rails db:create
rails db:seed
that worked
Dec 15, 2016 23:03
you're gonna want schema:load in between those two @Undo
@ArtOfCode seed doesn't load it for you?
Let's test it. @NobodyNada rails c
not that I've noticed
Then ap Post.last
it gave me a console thing, after spitting out a warning:
/Users/jonathan/Desktop/Metasmoke/config/initializers/appconfig.rb:1: warning: already initialized constant AppConfig
/Users/jonathan/Desktop/Metasmoke/config/environments/development.rb:19: warning: previous definition of AppConfig was here
Loading development environment (Rails 5.0.0.1)
irb(main):001:0>
yup
Dec 15, 2016 23:04
normal
ap Post.last in there
  Post Load (0.3ms)  SELECT  `posts`.* FROM `posts` ORDER BY `posts`.`id` DESC LIMIT 1
#<Post:0x007fc28b5ed170> {
                        :id => 1,
                     :title => "Test Post",
                      :body => "Test Post",
                      :link => "//stackoverflow.com/a/40291627",
        :post_creation_date => Thu, 15 Dec 2016 22:02:16 UTC +00:00,
                :created_at => Thu, 15 Dec 2016 23:02:16 UTC +00:00,
                :updated_at => Thu, 15 Dec 2016 23:02:16 UTC +00:00,
yeah, so it worked.
Sweet
great! thank you!
rails s to start the webserver
(short for rails server, as c is short for console)
Dec 15, 2016 23:04
I'll start learning Ruby soon and start working on it
and you should have a functioning metasmoke on localhost:3000
 
Conversation ended Dec 15, 2016 at 23:04.