Upon installing the mysql2 gem I got the following error:
I fixed it with:
ERROR: Failed to build gem native extension.
sudo apt-get install libmysql-ruby libmysqlclient-devThanks to this post here
ERROR: Failed to build gem native extension.
sudo apt-get install libmysql-ruby libmysqlclient-devThanks to this post here
def create_object(class_name, *args) the_class = Object.const_get(class_name) the_object = the_class.send :new, *args if !args.empty? the_object = the_class.send :new if args.empty? return the_object end
Heroku receiving push
-----> Removing .DS_Store files
-----> Ruby/Sinatra app detected
-----> Gemfile detected, running Bundler version 1.0.7
Unresolved dependencies detected; Installing...
Using --without development:test
/tmp/build_jpq0amd2bp92/Gemfile:5:in `evaluate': undefined method `ruby' for # (NoMethodError)
git remote rm heroku heroku create --stack cedar gem install bundler --pre bundle install git commit -am "fixed heroku problem" git push heroku master
heroku addons:add mongohq:free
heroku config:add TWITTER_KEY=`echo $TWITTER_KEY`
heroku config:add TWITTER_SECRET_KEY=`echo $TWITTER_SECRET_KEY`
sudo apt-get install postgresql sudo apt-get install postgresql-server-dev-all #Create a user account for postgresql, and a database with the name of your user account sudo -u postgres createuser --superuser myUbuntuUsername sudo -u postgres psql postgres=# \password myUbuntuUsername \q createdb myUbuntuUsername #Check that your postgres useraccount was setup properly psql \du
'dm-core'instead of
require 'datamapper'http://devcenter.heroku.com/articles/database