I am standing up a new Ubuntu server running MySQL. I have Capistrano set up on my development server and am trying to deploy:cold after running deploy:setup. After the deploy script tries to run
executing "cd /home/adm1n/www/knowit/releases/20121112152400 && bundle exec rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile"
I keep getting this message:
Rake Aborted!
uninitialized constant knowit
Tasks: TOP => environment
Any idea where this constant would be defined? This project is almost entirely new (rails new app Blah). Any suggestions on how I should attempt to troubleshoot this? Thx.
I'm running:
Rake 0.9.2.2
Ruby 1.9.3p194
Capistrano 2.13.5
Bundler 1.1.5
Rails 3.2.8
rvm 1.15.7
UPDATE: knowit is the name of my app. So there apparently there is something not initializing. Not sure where how to troubleshoot this.
UPDATE: Here is my routes.rb file (very basic)
Knowit::Application.routes.draw do
match ':controller(/:action(/:id))(.:format)'
end
Related
I have an application in rails 4.2.7.1, when I run the db:migrate in test in works perfectly
➜ bundle exec rake db:drop RAILS_ENV=test
➜ bundle exec rake db:ceate RAILS_ENV=test
➜ bundle exec rake db:migrate RAILS_ENV=test
But when I ran it in development, only the last migration or beginning from a drop database after executing firs migration I get this:
➜ bundle exec rake db:migrate -- --trace
== 20191112204156 MyNewModel: migrating ==============================
-- create_table(:global_clients)
-> 0.0121s
== 20191112204156 MyNewModel: migrated (0.0122s) =====================
rake aborted!
SystemStackError: stack level too deep
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
I'm using ruby 2.1.6, and mysql 0.318 and later 0.4.10, I did rvm implode to start it again and nothing happens. I do not know how to solve it, even I do not know how to debug it. So any tips will be good.
It's a problem with dthe difference from rais test and development environments
I am trying to run old Ruby on Rails project on my machine (Ubuntu). I installed rvm ruby 1.9.3-p551 and rails 2.3.2.
After installing bundler, gems n etc; I ran rake db:migrate.
I am getting the following error, please help me out.
user#iam:~/Desktop/practice/Application$ rake db:migrate
rake aborted!
(<unknown>): did not find expected node content while parsing a flow node at line 18 column 14
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
I think rake version problem installed rake in your machine is probably not matching for running your Rakefile before run rake db:migrate check rake command on your machine
I am trying to deploy my rails app to a digital ocean server using the capistrano gem, and I'm getting the error :
The deploy has failed with an error: #<SSHKit::Command::Failed: RAILS_ENV= bundle exec rake assets:precompile exit status: 256
RAILS_ENV= bundle exec rake assets:precompile stdout: Nothing written
RAILS_ENV= bundle exec rake assets:precompile stderr: rake aborted!
ActiveRecord::AdapterNotSpecified: database configuration does not specify adapter
Even though the local config/database.yml and shared/config/database.yml file on the server are both configured, and have production databases set.
In case I run the rake db:create command on the server, it does create the database successfully. So, can't really find the issue.
Using rails 4.0.2, ruby 2.1.0, capsitrano 3.1.0
Sorry - I don't have the rep to comment.
It's a bit short on detail about your deploy configuration, you probably need to share.
RAILS_ENV= bundle exec rake assets:precompile stdout: Nothing written
Would suggest to me that there is no RAILS_ENV set. I don't think there is an issue with the database .yml
Infact - this post might be relevant: Capistrano 3, Rails 4, database configuration does not specify adapter
I had create a empty new rails project with a scaffold successfully but when I try rake db:create, it throws me an error: rake aborted! uninitialized constant Rake::DSL.
As other SO post mentioned, I tried setting my Gemfile to gem 'rake', '0.8.7', but rake gives me another error:
You have requested: rake = 0.8.7
The bundle currently has rake locked at 0.9.2.2. Try running bundle
update rake Run bundle install to install missing gems.
Then I did as the message said and update rake and bundle install. Same error.
It is nice and easy experience to develop a project a rails but it is a nightmare porting between ruby versions, rails versions, difference gem and plugin versions..
Try to delete your Gemfile.lock, and type this on your terminal:
bundle install
I had create a empty new rails project with a scaffold successfully but when I try rake db:create, it throws me an error: rake aborted! uninitialized constant Rake::DSL.
for this problem I'd suggest running all rake tasks via bundle exec rake ...
I recently installed Rails 3.1 and now my old Rails 3.0 app won't rake db:migrate. This is what happens when I try to run bundle exec rake db:migrate. I'm on Ubuntu with no RVM
/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/shared_helpers.rb:142:in `block in cripple_rubygems': can't find executable rake (Gem::Exception)
from /usr/local/lib/ruby/gems/1.9.1/bin/rake:19:in `<main>'
When I run just rake db:migrate, it outputs:
rake aborted!
You have already activated rake 0.9.2.2, but your Gemfile requires rake 0.8.7. Consider using bundle exec.
(See full trace by running task with --trace)
which rake
/usr/local/bin/rake
Put this in your Gemfile:
gem 'rake' , '>= 0.9.2'
and run bundle update
you need to give more details in what environment you're running this:
which OS?
are you using RVM?
is this a brand new RVM setup per chance?
1) Try to run this:
gem list | rake
what output do you get?
2) If you don't see rake in the output, then do this:
gem install rake
and then try rake db:migrate again
3) If you see rake, but it still doesn't work, then do this:
which rake
what output do you get? it should look something like this:
~/.rvm/gems/ruby-1.9.2-p0/bin/rake