canvas-lms icon indicating copy to clipboard operation
canvas-lms copied to clipboard

Quick Start Directions - Not working for Mac OS 10.6.6

Open marpa opened this issue 15 years ago • 7 comments

Am using Quick Start directions to set up Canvas in following environment: -Mac OS 10.6.6 -MySQL server version: 5.1.48 -Apache 2.2.15

I followed instructions and everything seemed to install correctly: -installed RVM as a user -installed Gems in user folder -installed Bundler

When installing the Bundler, got the following errors: Installing mysql (2.8.1) with native extensions /Users/<>/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/site_ruby/1.8/rubygems/installer.rb:529:in `build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

   /Users/<<username>>/.rvm/rubies/ruby-1.8.7-p330/bin/ruby extconf.rb 

checking for mysql_query() in -lmysqlclient... no checking for main() in -lm... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lz... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lsocket... no checking for mysql_query() in -lmysqlclient... no checking for main() in -lnsl... no checking for mysql_query() in -lmysqlclient... no checking for main() in -lmygcc... no checking for mysql_query() in -lmysqlclient... no *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.

Here are versions: -Rails 3.0.3 -Ruby 1.8.7 (2010-12-23 patchlevel 330) [i686-darwin10.6.0] -RubyGems 1.5.0

When I try to run: ~/canvas$ rake db:initial_setup

I get the following error: Could not find gem 'rails (= 2.3.9, runtime)' in any of the gem sources listed in your Gemfile. /Users/<>/Sites/canvas/Rakefile:4

When I try to start the server: ~/canvas$ script/server

I get the following error: /Users/<>/.rvm/gems/ruby-1.8.7-p330/gems/bundler-1.0.10/lib/bundler/resolver.rb:280:in `resolve': Could not find gem 'rails (= 2.3.9, runtime)' in any of the gem sources listed in your Gemfile. (Bundler::GemNotFound)

Gem sources listed in canvas/Gemfile are: source :gemcutter source 'http://gems.github.com'

marpa avatar Feb 03 '11 18:02 marpa

how did you install mysql? it looks like gem can't find the header files needed to build the gem- pretty common if they're installed somewhere less standard (like /opt, which is what fink and macports will do). if you can find where they're at, you can use the flags:

--with-mysql-dir=[dir] --with-mysql-lib=[libdir] --with-mysql-include=[includedir]

again, check in /opt/ and in /usr/local to see if either have the libraries and header files for mysql.

tommetge avatar Feb 03 '11 19:02 tommetge

In order for me to get mysql to work with Ruby on Rails in general I had to do the following: first create a file called .rvmrc in your home directory add rvm_archflags="-arch x86_64" save and close this file.

To install the mysql gem and have it work with mysql execute this in terminal: ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

The next time you run bundler it will use the mysql gem you just installed.

I actually got instructure to run but in the end I created a virtual machine with Ubuntu on it and followed their production directions. Apache and mysql are so much faster than webbrick and sqlite.

Hope it helps, Tyler

tylerclair avatar Feb 03 '11 21:02 tylerclair

thanks tom, tyler. marpa, please reopen if you're still having issues

jtolio avatar Feb 04 '11 17:02 jtolio

I got this to work by setting my GEM_HOME environment variable before running Bundler (I thought this got set by specifying export GEM_HOME=~/gems in my .bash_profile... which I assumed is = .bashrc).

marpa avatar Feb 05 '11 16:02 marpa

that might work marpa, though of course the thing that always gets me when setting my .bash_profile/.bashrc is that you have to reload your terminal so bash picks up the settings.

jtolio avatar Feb 05 '11 16:02 jtolio

I did reload terminal after setting GEM_HOME environment variable in .bash_profile... It was only after I ran export GEM_HOME=~/gems in terminal that bundler worked... I think.

marpa avatar Feb 05 '11 16:02 marpa

yeah, that link i sent you on the other ticket says you need to use .bash_login

jtolio avatar Feb 05 '11 16:02 jtolio