Gitlab on Ubuntu: incomplete install? - ruby-on-rails

Gitlab 8.5.8 installed on Ubuntu 16.04, through apt-get (NOT the Omnibus install). INstallation was fraught (essentially because of https://bugs.launchpad.net/ubuntu/+source/gitlab/+bug/1574349, which required workarounds). However it came to an end with most stuff working (the one I tried so far, that is). However I suspect the installation is not complete. Here is why:
1) the commands gitlab-rails and gitlab-ctl are nowhere to be found, yet they are all over the gitlab site doc. I suspect that gitlab-rails may be present as /usr/share/gitlab/bin/rails , but hve no way to confirm (and that still leaves the gitlab-ctl question).
2) Email notifications (e.g. on user add) are not being sent even after going through the config files. When I try the test suggested in https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/settings/smtp.md#gmail (using the rails command above, as gitlab-rails is not there), I get:
# /usr/share/gitlab/bin/rails console
Loading development environment (Rails 4.2.7.1)
irb(main):001:0> Notify.test_email('destination_email#address.com', 'Message Subject', 'Message Body').deliver_now
NameError: uninitialized constant Notify
from (irb):1
from /var/lib/gems/2.3.0/gems/railties-4.2.7.1/lib/rails/commands/console.rb:110:in `start'
from /var/lib/gems/2.3.0/gems/railties-4.2.7.1/lib/rails/commands/console.rb:9:in `start'
from /var/lib/gems/2.3.0/gems/railties-4.2.7.1/lib/rails/commands/commands_tasks.rb:68:in `console'
from /var/lib/gems/2.3.0/gems/railties-4.2.7.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /var/lib/gems/2.3.0/gems/railties-4.2.7.1/lib/rails/commands.rb:17:in `<top (required)>'
from /usr/share/gitlab/bin/rails:4:in `require'
from /usr/share/gitlab/bin/rails:4:in `<main>'
I know bubke about ruby, but the error message makes me think that I am either running the wrong console (see point 1) or that some library (containing the NOtify class, for instance) is missing form the install.
Google is not helping and I am somewhat stymied: can this be fixed? Need I wipe everything and go Omnibus (which irks me, becauseI'd rather have an apt managed install)?
Somebody pointed me to this guide: https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-gitlab-on-ubuntu-16-04 It may or may not be the Omnibus install, but imporved in that it would appear to funnel the install through apt)
Suggestions appreciated.

Related

Errors when using pre-compiled gems with native extensions on Plesk-managed machines without development options

I am aiming to have a production machine running a Ruby on Rails app. However, this production machine is managed with Plesk and allows only very rudimentary access, but was promised to be able to run Ruby on Rails apps.
Indeed it is in principle able to run Ruby on rails for an overly simple example, but running any app requiring gems with native extensions (as e.g. nokogiri, which is required already by the rails default app, generated by rails new) already fails.
Part of the log looks like this:
libruby.so.2.4: cannot open shared object file: No such file or directory - /var/www/vhosts/hosting116285.a2f45.netcup.net/test.gcsb.info/vendor/bundle/ruby/2.4.0/gems/msgpack-1.2.6-x86_64-linux/lib/msgpack/msgpack.so (LoadError)
/var/www/vhosts/hosting116285.a2f45.netcup.net/test.gcsb.info/vendor/bundle/ruby/2.4.0/gems/msgpack-1.2.6-x86_64-linux/lib/msgpack.rb:11:in `require'
...
...
...
/var/www/vhosts/hosting116285.a2f45.netcup.net/test.gcsb.info/vendor/bundle/ruby/2.4.0/gems/rack-2.0.6/lib/rack/builder.rb:55:in `initialize'
config.ru:1:in `new'
config.ru:1:in `<main>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:110:in `eval'
/usr/share/passenger/helper-scripts/rack-preloader.rb:110:in `preload_app'
/usr/share/passenger/helper-scripts/rack-preloader.rb:156:in `<module:App>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<main>'
I have the options to "restart the app", "install packages" (which executes a bundle install --path vendor/bundle according to documentation), and "add environment variables".
I have very limited SSH access to the machine, but no access to any compilers or libraries.
The support advised me to "precompile my gems", but did not give any specific advice how to do this. I set up a virtual development machine which is somewhat near to the production machine, but definitely not yet the same in terms of all paths and e.g. Linux kernel version. I compile with gem-compiler (https://github.com/luislavena/gem-compiler) which supposedly works fine, but the precompiled gems in bundle/cache, and install them via the Plesk interface.
However, the app keeps throwing errors. The pre-compiled gems (msgpack is one of them; originally with native extensions) seem to be linked in a wrong fashion? I have honestly no idea anymore. I already tried packing my development machine's libruby.so.2.4 onto the production machine, which reduced the errors a little but did not help to solve it.
Do you have any suggestions of an advisable strategy to circumvent the given limitations? Am I doing it right, but it is simply not possible to make it run in this environment?
Thanks in advance!
Robert

Ruby-on-rails cannot connect to mysql2; Windows 10

I'm on Windows 10 and am a complete beginner programmer. I am using Ruby 2.4.2, Rails 5.1.4 and am following a Lynda course on how to run Rails 5 on Windows.
There's a part near the end where the tutor says to enter:
>rails db:schema:dump
to test whether you've established a connection to the MySQL by create a file inside the created project.
This is what I get when I enter the above command:
C:\Users\notmyactualuser\Documents\Sites\demo_project>rails db:schema:dump
rails aborted!
LoadError: cannot load such file -- mysql2/2.4/mysql2
C:/Users/notmyactualuser/Documents/Sites/demo_project/config/application.rb:7:in `<top (required)>'
C:/Users/notmyactualuser/Documents/Sites/demo_project/Rakefile:4:in `require_relative'
C:/Users/notmyactualuser/Documents/Sites/demo_project/Rakefile:4:in `<top (required)>'
bin/rails:4:in `require'
bin/rails:4:in `<main>'
(See full trace by running task with --trace)
The tutor doesn't address what to do with potential errors and I can't seem to find an answer. I want to build a login form using RoR and am trying to grasp the basics (clearly failing). If possible, can I get help with the above and be directed to an easy, simple, "how-to" on building a login form?
Thanks a lot.
P.S. My first post, so please go easy on me, lol.
UPDATE: So I used the command on CMD and it looks like it's successful. Can somebody point me to how to get it working with Rails?
UPDATE 2: I put in the command that Hoa requested and I got this:
ERROR: "bundle install" was called with arguments ["mysql2"]
Usage: "bundle install [OPTIONS]"
UPDATE 3: I did as Satishkakumar said and I got this:
You've installed the binary version of mysql2.
It was built using MySQL Connector/C version 6.1.6.
It's recommended to use the exact same version to avoid potential issues.
At the time of building this gem, the necessary DLL files were retrieved from:
http://cdn.mysql.com/Downloads/Connector-C/mysql-connector-c-6.1.6-win32.zip
This gem includes vendor/libmysql.dll with redistribution notice in vendor/README.
======================================================================================================
Looks like it's all sorted now? Please let me know if there's any more.
I think its issue of installing mysql2 gem in system. Follow below steps to install.
In Gemfile add the line
gem 'mysql2', '0.3.21'
And run bundle install from project folder in CMD.
bundle install mysql2
This might solve your issue. Let me know in comment section if your issue still persists.

Rails app doesn't run on AWS Elastic Beanstalk, sqlite3 error

I have been trying to get started running Rails on AWS' Elastic Beanstalk, but I have run in to a seemingly insurmountable obstacle: While I am able to spin up a new Elastic Beanstalk running the sample application, I cannot seem to get an EB instance to successfully run my own code.
Here are the steps I have taken:
Locally running ruby 1.9.3p545 on OSX 10.9.3
Installed aws-eb client tools.
Scrupulously followed the following tutorial from Amazon: Deploying a Rails Application to AWS Elastic Beanstalk (tl;dnr: use 'rails new' to create a new rails app, commit to git and then use 'eb init' to create an EB instance of the type '64bit Amazon Linux 2014.03 v1.0.3 running Ruby 1.9.3' and then running 'eb start')
After waiting a seeming eternity for the EB instance to be created, I navigate to the url Amazon provides.
Instead of seeing my rails app (which, by the way, runs fine locally), I get the dreaded "We're sorry, but something went wrong" page:
I have tried these steps multiple times, with the same results. I have tried using different environments (the Ruby 2.0.0 Puma and Passenger ones, for instance, updating my ruby via rvm as necessary).
Before this is flagged as a duplicate, let me state straight away that I have looked at the following questions and found that they have not solved my problem:
AWS Elastic Beanstalk: Launching a new Rails App
Deploying an existing Rails app to AWS Elastic Beanstalk
Following the advice in the question "AWS Elastic Beanstalk: Launching a new Rails App", which seems very similar to my issue, I let the app run over night and I am still getting the error.
I've ssh'd in to the instance. Interestingly, both production.log and development.log appear to be empty (the ones in /var/app/support/logs, anyway). However, I find the following in passenger.log:
********* snip *********
[ 2014-06-12 21:42:38.8400 5133/7fe66aee4700 agents/HelperAgent/RequestHandler.h:2210 ]: [Client 20] Cannot checkout session.
Error page:
cannot load such file -- sqlite3/sqlite3_native (LoadError)
/usr/local/share/gems1.9/gems/sqlite3-1.3.9/lib/sqlite3.rb:6:in require'
/usr/local/share/gems1.9/gems/sqlite3-1.3.9/lib/sqlite3.rb:6:inrescue in '
/usr/local/share/gems1.9/gems/sqlite3-1.3.9/lib/sqlite3.rb:2:in <top (required)>'
/usr/local/share/gems1.9/gems/bundler-1.6.2/lib/bundler/runtime.rb:76:inrequire'
/usr/local/share/gems1.9/gems/bundler-1.6.2/lib/bundler/runtime.rb:76:in block (2 levels) in require'
/usr/local/share/gems1.9/gems/bundler-1.6.2/lib/bundler/runtime.rb:72:ineach'
/usr/local/share/gems1.9/gems/bundler-1.6.2/lib/bundler/runtime.rb:72:in block in require'
/usr/local/share/gems1.9/gems/bundler-1.6.2/lib/bundler/runtime.rb:61:ineach'
/usr/local/share/gems1.9/gems/bundler-1.6.2/lib/bundler/runtime.rb:61:in require'
/usr/local/share/gems1.9/gems/bundler-1.6.2/lib/bundler.rb:132:inrequire'
/var/app/current/config/application.rb:7:in <top (required)>'
/var/app/current/config/environment.rb:2:inrequire'
/var/app/current/config/environment.rb:2:in <top (required)>'
config.ru:3:inrequire'
config.ru:3:in block in <main>'
/usr/local/share/gems1.9/gems/rack-1.5.2/lib/rack/builder.rb:55:ininstance_eval'
/usr/local/share/gems1.9/gems/rack-1.5.2/lib/rack/builder.rb:55:in initialize'
config.ru:1:innew'
config.ru:1:in <main>'
/usr/local/share/gems1.9/gems/passenger-4.0.41/helper-scripts/rack-preloader.rb:112:ineval'
/usr/local/share/gems1.9/gems/passenger-4.0.41/helper-scripts/rack-preloader.rb:112:in preload_app'
/usr/local/share/gems1.9/gems/passenger-4.0.41/helper-scripts/rack-preloader.rb:158:in'
/usr/local/share/gems1.9/gems/passenger-4.0.41/helper-scripts/rack-preloader.rb:29:in <module:PhusionPassenger>'
/usr/local/share/gems1.9/gems/passenger-4.0.41/helper-scripts/rack-preloader.rb:28:in'
App 5241 stdout:
App 5241 stdout:
[ 2014-06-12 21:45:26.2512 5133/7fe66d1ef700 Pool2/Implementation.cpp:883 ]: Could not spawn process for group /var/app/current#default: An error occured while starting up th$
in 'void Passenger::ApplicationPool2::SmartSpawner::handleErrorResponse(Passenger::ApplicationPool2::SmartSpawner::StartupDetails&)' (SmartSpawner.h:455)
in 'std::string Passenger::ApplicationPool2::SmartSpawner::negotiatePreloaderStartup(Passenger::ApplicationPool2::SmartSpawner::StartupDetails&)' (SmartSpawner.h:566)
in 'void Passenger::ApplicationPool2::SmartSpawner::startPreloader()' (SmartSpawner.h:206)
in 'virtual Passenger::ApplicationPool2::ProcessPtr Passenger::ApplicationPool2::SmartSpawner::spawn(const Passenger::ApplicationPool2::Options&)' (SmartSpawner.h:752)
in 'void Passenger::ApplicationPool2::Group::spawnThreadRealMain(const Passenger::ApplicationPool2::SpawnerPtr&, const Passenger::ApplicationPool2::Options&, unsigned in$
******** end snip ********
Not sure if sqlite3 is the problem or not, but it does appear to be installed on the instance. Just in case, I installed the sqlite3 gem again.
Here is the output of passenger-status:
Version : 4.0.41
Date : 2014-06-13 13:25:52 +0000
Instance: 5148
----------- General information -----------
Max pool size : 6
Processes : 0
Requests in top-level queue : 0
----------- Application groups -----------
/var/app/current#default:
App root: /var/app/current
Requests in queue: 0
I'm no expert, but it seems like passenger isn't running (processes == 0).
What am I missing? Is there some "JUST_WORK_DARNIT" config that I have neglected to set to true?
If, in fact, there is an issue with the sqlite3 install, as is suggested below, what can I do to resolve the issue?
Can you try installing sqlite-devel by running yum install sqlite-devel?
You may want to use ebextensions to try this out on beanstalk.
Try creating a file with path .ebextensions/00-myfile.config in your app source directory before deploying to beanstalk.
packages:
yum:
sqlite-devel: []
Sounds similar to the problem discussed here Why can't I install the SQLite gem?
Let me know if that works.
Update
There is one thing that changed with Rails 4. Possibly you are hitting this issue.
See the discussion here: https://github.com/rails/rails/pull/8468
The default sample app generated by rails 4 does not work in production mode because of the above change. You can however make it work by modifying the sample app to include a non-default web page.
I tried the following:
After running "rails new appname", "git init", "eb init" try the following steps. (Based on this answer).
Edit config/routes.rb so that it contains root :to => 'proto#index'
Create app/controllers/proto_controller.rb with the following contents
class ProtoController < ApplicationController
def index
end
end
Create file app/views/proto/index.html.erb and write something in that file ... 'Hello World'.
Then launch your environment. That should work.
When I try without following the above three steps then I also get an error page. But with these changes I do not see an error page.
I would recommend you perform the above steps in a fresh directory on a new environment. I tested with the latest Ruby solution stack "64bit Amazon Linux 2014.03 v1.0.4 running Ruby 2.0 (Puma)".
Also at some point when you get to Step 6 on this tutorial, you might end up replacing gem 'sqlite3' with gem 'mysql2' but that is the next step after you get the sample app running.
Yes, the sqlite3 gem is the problem. It is installed, but not correctly installed. A key file (namely the sqlite3_native library file) is missing.

Rails Console not loading? y (Errno::ENOENT)

I'm all of the sudden getting the follow error message when I try to load the rails console. I just recently switched databases to postgres, which has given me a slew of problems (although I must admit I like it a lot better than mysql!), so I'm assuming this is related to that. Any ideas?
y (Errno::ENOENT)/ruby/1.9.3-p327/lib/ruby/gems/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:251:in `require': No such file or directory - /usr/local/lib/?
from /usr/local/Cellar/ruby/1.9.3-p327/lib/ruby/gems/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:251:in `block in require'
from /usr/local/Cellar/ruby/1.9.3-p327/lib/ruby/gems/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:236:in `load_dependency'
from /usr/local/Cellar/ruby/1.9.3-p327/lib/ruby/gems/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:251:in `require'
from /usr/local/Cellar/ruby/1.9.3-p327/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprockets/processing.rb:3:in `<top (required)>'
from /usr/local/Cellar/ruby/1.9.3-p327/lib/ruby/gems/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:251:in `require'
from /usr/local/Cellar/ruby/1.9.3-p327/lib/ruby/gems/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:251:in `block in require'
from /usr/local/Cellar/ruby/1.9.3-p327/lib/ruby/gems/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:236:in `load_dependency'
from /usr/local/Cellar/ruby/1.9.3-p327/lib/ruby/gems/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:251:in `require'
from /usr/local/Cellar/ruby/1.9.3-p327/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:5:in `<top (required)>'
from /usr/local/Cellar/ruby/1.9.3-p327/lib/ruby/gems/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:251:in `require'
from /usr/local/Cellar/ruby/1.9.3-p327/lib/ruby/gems/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:251:in `block in require'
from /usr/local/Cellar/ruby/1.9.3-p327/lib/ruby/gems/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:236:in `load_dependency'
from /usr/local/Cellar/ruby/1.9.3-p327/lib/ruby/gems/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:251:in `require'
from /usr/local/Cellar/ruby/1.9.3-p327/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2/lib/sprockets/environment.rb:1:in `<top (required)>'
from /usr/local/Cellar/ruby/1.9.3-p327/lib/ruby/gems/1.9.1/gems/actionpack-3.2.10/lib/sprockets/railtie.rb:23:in `block in <class:Railtie>'
from /usr/local/Cellar/ruby/1.9.3-p327/lib/ruby/gems/1.9.1/gems/railties-3.2.10/lib/rails/initializable.rb:30:in `instance_exec'
from /usr/local/Cellar/ruby/1.9.3-p327/lib/ruby/gems/1.9.1/gems/railties-3.2.10/lib/rails/initializable.rb:30:in `run'
from /usr/local/Cellar/ruby/1.9.3-p327/lib/ruby/gems/1.9.1/gems/railties-3.2.10/lib/rails/initializable.rb:55:in `block in run_initializers'
from /usr/local/Cellar/ruby/1.9.3-p327/lib/ruby/gems/1.9.1/gems/railties-3.2.10/lib/rails/initializable.rb:54:in `each'
from /usr/local/Cellar/ruby/1.9.3-p327/lib/ruby/gems/1.9.1/gems/railties-3.2.10/lib/rails/initializable.rb:54:in `run_initializers'
from /usr/local/Cellar/ruby/1.9.3-p327/lib/ruby/gems/1.9.1/gems/railties-3.2.10/lib/rails/application.rb:136:in `initialize!'
from /usr/local/Cellar/ruby/1.9.3-p327/lib/ruby/gems/1.9.1/gems/railties-3.2.10/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/benyorke/rubystore/config/environment.rb:6:in `<top (required)>'
from /usr/local/Cellar/ruby/1.9.3-p327/lib/ruby/gems/1.9.1/gems/railties-3.2.10/lib/rails/application.rb:103:in `require'
from /usr/local/Cellar/ruby/1.9.3-p327/lib/ruby/gems/1.9.1/gems/railties-3.2.10/lib/rails/application.rb:103:in `require_environment!'
from /usr/local/Cellar/ruby/1.9.3-p327/lib/ruby/gems/1.9.1/gems/railties-3.2.10/lib/rails/commands.rb:40:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
I believe this might be a bug with Ruby 1.9.3-p327 that just got fixed by Ruby 1.9.3-p385. Does upgrading to 1.9.3-p385 fix it for you?
What seems peculiar in this error message, and is similar to issues I've been having, is the question mark at the end of the path: No such file or directory - /usr/local/lib/?. I've been getting similar strange error messages related to ruby's require and paths with question marks, at symbols, or other random characters at the end of paths after upgrading to 1.9.3-p327 from 1.9.3-p194 a few weeks ago. However, the issues have been extremely sporadic, and around the same time we experienced some hardware failures, so it's been tough to track down.
Today the issue started happening consistently in one specific context, so I was able to do some additional debugging. Updating to 1.9.3-p385 seems to have fixed it, but given the sporadic nature of the issues I've been experiencing, I'm not entirely 100% this is actually the fix. I'm also not entirely sure if this is the same issue you're having. The mysterious question mark in the path just makes it appear like it might be related. Here are a couple examples of the type of errors we were getting:
No such file or directory - /srv/shared/rails/internal/admin/vendor/bun#
No such file or directory - /srv/shared/rails/internal/admin/vendor?
If it's at all related to the same issues I've been experiencing, but the 1.9.3-p385 upgrade doesn't fix it, a few other notes or things to explore:
I was able to reproduce this problem today on 1.9.3-p327 and 1.9.3-p374. However, the problem didn't seem present on 1.9.3-p194, 1.9.3-p286, and 1.9.3-p385.
Are you using symlinks anywhere in in your gem load path? For example, we use Bundler to install gems into a local vendor/bundle path inside each application. But the vendor/bundle is actually a symlink to another location (this is related to a Capistrano deployment setup). I believe the symlink was possibly playing a role. In today's tests, if I wasn't using a symlink, the problem disappeared on all versions of ruby.
Do you use bundler-exec? On another occasion where this problem was happening somewhat sporadically, bypassing the aliases bundler-exec also seemed to magically fix things, but today's problem wasn't even touching bundler-exec, so I'm not too sure.
Most of the time our problem was very random (it would go away after a few attempts of running the same command), but on a few occasions, the problem would persist for an hour or more before disappearing.
Some information about our systems:
64bit RedHat Enterprise Linux 6
Bundler 1.2.3
Rubygems 1.2.5 (also happened under 1.2.4)
rbenv
But like I said, this issue also happened to coincide with some hardware disk failures and general server wonkiness on our end, so I haven't really been certain if this was a Ruby issue or what's been going on. But here's to hoping 1.9.3-p385 actually fixes it.
Sorry for not updating this thread - I have actually been working on this in the background for a few weeks now. I couldn't find ANY information on this online, so I'm going to post as detailed of a solution as I can.
The Issues
The issues I was having was that I could not access rails console, and I had to manually start the postgres server every-time I restarted my machine. My solutions to that, as I have worked with this for a few weeks were
In regards to the console I used herokus console. By pushing my app to heroku (which is free) not only could I view it on the web (any machine) but on my machine I could run
$ heroku run console
and get access to a console. Now this isn't a perfect solution in anyway as I can't manipulate data on my machine but it saved me many times
In regards to the server I ran
$ brew info postgres
which gave me the commands to manually restart the server
You should reload postgresql:
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
The Solution
To be honest, I have run every command I can find dozens of times, and just today got it working. I don't know if I was making typos, doing it in an ineffective order, mixing up pg/postgres/postgresql or what but what I did below worked
When using this solution, it will erase all databases. Migrations will be able to rebuild the structure, but any data will be lost
1. Updated Homebrew
$ brew update
If you don't have home-brew, check out this page for instructions to install (saved my neck with many things, including minimagick imagemagick and postgres!): Link
2. Removed postgresql
$ brew rm postgresql --force
3. Installed postgreql
$ brew install postgresql
This is the first step to reference postgres. When looking online, I ran across commands that used postgresql, postgres, and pg. Postgresql refers to the actually PostgreSQL program. postgres and pg are ruby gems, which we will get to later
4. Ran suggested commands
After running "$ brew install postgres" there is a lot of information given to you. Make sure to read through it, as it will suggest what commands to run. Use these suggestions to find the commands I reference below.
If you need to access this information later simply run
$ brew info postgresql
To initialize the database
$ initdb file/path
Set up the autolauncher
$ cp file/path ~ LaunchAgents/file/path
Launch postgresql initially
$ launchctl load file/path
$ pg_ctl-D file/oath
5. Download Postgres.app
Although to my knowledge this seems redundant, this is what got it to work on my mac. visit http://postgresapp.com to download
6. Install gems
There are two gems - postgres and pg. I required pg in my gemfile and ran a bundle install command, however it still gave me issues until I installed postgres on my machine - even though it is not required in my gemfile, rails console wont seem to work without it atleast installed
In the gem file
gem 'pg'
Run a bundle install command in a terminal window
$ bundle install
Sudo install the postgres gem
$ sudo gem install postgres
At this point everything should be working. You should be able to restart the machine and not have any problems!

spork-minitest error but tests pass

I finally created a Windows environment for new Rails applications that I like. Everything was working until I decided to create a how-to for it. You can find the steps on this blog post.
I did a fresh install to make sure everything was on the up and up. After everything is said and done the tests run fine and I do get a growl popup but the autotest window shows the following error. What's going on?
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/spork-minitest-0.0.3/bin/testdrb:7:in `exit': can't convert DRb::DRbObject into Integer (TypeError)
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/spork-minitest-0.0.3/bin/testdrb:7:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/bin/testdrb:19:in `load'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/bin/testdrb:19:in `<main>'
Needed to install the gem spork-testunit

Resources