Heroku: No Rakefile found (but works locally)
You have to push to the master branch. From looking at the comments above it looks like you are not doing this.
Therefore, assuming you're developing your application in the master branch, you can deploy with a simple:
git push heroku master
If you're not developing on master deploy with:
git push heroku your_branch_name:master
replacing your_branch_name with the name of the branch you're using.
heroku run rake db:migrate ... rake aborted! No Rakefile found
Whenever you are struggling with Heroku you should check your logs:
heroku logs
Scan through for any errors that you can google and/or get hints to what is going wrong.
If you are using git you can quickly search for errors with this:
git grep "whatever you want to search for"
You will then know where to find the file so you might try to verify that the rakefile actually exists with:
git grep rakefile
Sometimes it is easier to just start fresh and reset your database and reload your current schema with:
rake db:reset db:migrate all
This will destroy your db and then create it and then migrate your current schema:
rake db:drop db:create db:migrate
If you want to reset the heroku db
To drop the database, if you are using SHARED_DATABASE_URL:
heroku pg:reset DATABASE
To recreate the database with nothing in it:
heroku run rake db:migrate
To populate the database with your seed data:
heroku run rake db:seed
Failed to build and deploy node.js project with Travis-ci - No Rakefile found
Your .travis.yml
file does not validate; you can validate it at http://lint.travis-ci.org/.
Found an issue with the node_js key:
Detected unsupported Node.js versions. For an up-to-date list of supported Node.js versions, see Travis CI documentation at http://bit.ly/travis-ci-environment
Try using 0.8.x
.
heroku rake db:migrate fails
SELF-SOLVED
Ultimately, the solution to this problem was found in 2 stages:
1) I discovered that my rvm gemset list was blank. Not sure when or how this happened, because it was set before. It may be related to me messing around with RubyMine settings, which allow you to tweak the Ruby SDK and Gems manually. I did an rvm gemset to set the correct set, and then rvm gemset install and rvm gemset update to get all the proper gems loaded into the environment. I'll be honest, I don't fully understand what's going on here and how it inter-relates with the manual gem install commands, so it's very possible I mucked the whole thing up through my meager understanding of RVM.
At this point, heroku rake db:migrate still failed with the same error, however:
2) My Heroku credentials had somehow become disconnected. I'm guessing Git & Rake were failing due to that. Again, I don't fully understand the ramifications here, but ultimately, the solution was right in front of my face on the Heroku Setup page. Once I retyped heroku create, my existing credentials were set properly again, and rake stopped failing.
SUMMARY
I was half tempted to just delete or forget about this post (since I self-fixed), but I'm guessing I'm not the only Rails noob that will be frustrated by errors like these. I'm guessing they (the errors) were caused by me fumbling around the system (especially RubyMine) trying to figure out how everything was interconnected. Since the answers to problems such as these are probably not self evident to new Ruby/Rails programmers, I'll leave this up.
heroku push error: Could not detect rake tasks
Sometimes Heroku throws an issue on deployment about assets. You can precompile assets and push it to Heroku.
RAILS_ENV=production bundle exec rake assets:precompile
Update:
In case of it doesn't work, make sure to add RAILS_SERVE_STATIC_FILES
env. to yr server.
Make it enabled
or true
nor anything
:)
Because in Rails <5.1 production.rb
has
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
Heroku: App -> Settings -> "Reveal Config Vars"
Sample:
Related Topics
Ruby Class Instance Variables and Inheritance
Pg Error Could Not Connect to Server: Connection Refused Is the Server Running on Port 5432
"Errno::Eaccess...Permission Denied" Running Compass Watch
How to Start the Ruby Debugger on Exception
Simple Ruby Input Validation Library
Mongoid: Find Through Array of Ids
Ruby Way to Group Anagrams in String Array
Convert String with Comma to Integer
How to Organize Minitest/Unit Tests
How to View a Sample of the Call Stack in Ruby
How to Get the Version from a Gemspec File
Changing Active Model Serializers Default Adapter
How to Recursively Require All Files in a Directory in Ruby
Rails: Why Images Are Not Showing in My Rails Basic App
Using Nokogiri HTML Builder to Create Fragment with Multiple Root Nodes