Skip to content

Instantly share code, notes, and snippets.

@9cardinals
Created November 25, 2013 03:04
Show Gist options
  • Save 9cardinals/7635641 to your computer and use it in GitHub Desktop.
Save 9cardinals/7635641 to your computer and use it in GitHub Desktop.
rails no longer generating models/controllers, starting server, etc when switching from 4.0.1 and 3.2.12. Earlier today rails was working with no issues. I then made some changes to a gem which required switching dependencies from 3.2.12 ==> 4.0.1 and back. After that, Rails completely stopped working on all commands aside from -v
Last login: Sun Nov 24 18:05:32 on console
vera:code monicacardinal$ cd bloccit/
vera:bloccit monicacardinal$ ls -a
. Gemfile app db tmp
.. Gemfile.lock bin lib vendor
.git README.md config log
.gitignore Rakefile config.ru public
vera:bloccit monicacardinal$ rails s
Usage:
rails new APP_PATH [options]
Options:
-r, [--ruby=PATH] # Path to the Ruby binary of your choice
# Default: /Users/monicacardinal/.rvm/rubies/ruby-2.0.0-p247/bin/ruby
-b, [--builder=BUILDER] # Path to a application builder (can be a filesystem path or URL)
-m, [--template=TEMPLATE] # Path to an application template (can be a filesystem path or URL)
[--skip-gemfile] # Don't create a Gemfile
[--skip-bundle] # Don't run bundle install
-G, [--skip-git] # Skip Git ignores and keeps
-O, [--skip-active-record] # Skip Active Record files
-S, [--skip-sprockets] # Skip Sprockets files
-d, [--database=DATABASE] # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc)
# Default: sqlite3
-j, [--javascript=JAVASCRIPT] # Preconfigure for selected JavaScript library
# Default: jquery
-J, [--skip-javascript] # Skip JavaScript files
[--dev] # Setup the application with Gemfile pointing to your Rails checkout
[--edge] # Setup the application with Gemfile pointing to Rails repository
-T, [--skip-test-unit] # Skip Test::Unit files
[--old-style-hash] # Force using old style hash (:foo => 'bar') on Ruby >= 1.9
Runtime options:
-f, [--force] # Overwrite files that already exist
-p, [--pretend] # Run but do not make any changes
-q, [--quiet] # Suppress status output
-s, [--skip] # Skip files that already exist
Rails options:
-h, [--help] # Show this help message and quit
-v, [--version] # Show Rails version number and quit
Description:
The 'rails new' command creates a new Rails application with a default
directory structure and configuration at the path you specify.
You can specify extra command-line arguments to be used every time
'rails new' runs in the .railsrc configuration file in your home directory.
Note that the arguments specified in the .railsrc file don't affect the
defaults values shown above in this help message.
Example:
rails new ~/Code/Ruby/weblog
This generates a skeletal Rails installation in ~/Code/Ruby/weblog.
See the README in the newly created application to get going.
vera:bloccit monicacardinal$ rails c
Usage:
rails new APP_PATH [options]
Options:
-r, [--ruby=PATH] # Path to the Ruby binary of your choice
# Default: /Users/monicacardinal/.rvm/rubies/ruby-2.0.0-p247/bin/ruby
-b, [--builder=BUILDER] # Path to a application builder (can be a filesystem path or URL)
-m, [--template=TEMPLATE] # Path to an application template (can be a filesystem path or URL)
[--skip-gemfile] # Don't create a Gemfile
[--skip-bundle] # Don't run bundle install
-G, [--skip-git] # Skip Git ignores and keeps
-O, [--skip-active-record] # Skip Active Record files
-S, [--skip-sprockets] # Skip Sprockets files
-d, [--database=DATABASE] # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc)
# Default: sqlite3
-j, [--javascript=JAVASCRIPT] # Preconfigure for selected JavaScript library
# Default: jquery
-J, [--skip-javascript] # Skip JavaScript files
[--dev] # Setup the application with Gemfile pointing to your Rails checkout
[--edge] # Setup the application with Gemfile pointing to Rails repository
-T, [--skip-test-unit] # Skip Test::Unit files
[--old-style-hash] # Force using old style hash (:foo => 'bar') on Ruby >= 1.9
Runtime options:
-f, [--force] # Overwrite files that already exist
-p, [--pretend] # Run but do not make any changes
-q, [--quiet] # Suppress status output
-s, [--skip] # Skip files that already exist
Rails options:
-h, [--help] # Show this help message and quit
-v, [--version] # Show Rails version number and quit
Description:
The 'rails new' command creates a new Rails application with a default
directory structure and configuration at the path you specify.
You can specify extra command-line arguments to be used every time
'rails new' runs in the .railsrc configuration file in your home directory.
Note that the arguments specified in the .railsrc file don't affect the
defaults values shown above in this help message.
Example:
rails new ~/Code/Ruby/weblog
This generates a skeletal Rails installation in ~/Code/Ruby/weblog.
See the README in the newly created application to get going.
vera:bloccit monicacardinal$ clear
vera:bloccit monicacardinal$ pwd
/Users/monicacardinal/code/bloccit
vera:bloccit monicacardinal$ git status
# On branch post-comment-model
# Changes not staged for commit:
# (use "git add/rm <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# deleted: app/assets/stylesheets/application.css
#
no changes added to commit (use "git add" and/or "git commit -a")
vera:bloccit monicacardinal$ rails -v
Rails 3.2.12
vera:bloccit monicacardinal$ rake rails:update:bin
rake aborted!
Don't know how to build task 'rails:update:bin'
(See full trace by running task with --trace)
vera:bloccit monicacardinal$ rake rails:update:bin --trace
rake aborted!
Don't know how to build task 'rails:update:bin'
/Users/monicacardinal/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.1.0/lib/rake/task_manager.rb:49:in `[]'
/Users/monicacardinal/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.1.0/lib/rake/application.rb:148:in `invoke_task'
/Users/monicacardinal/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.1.0/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/Users/monicacardinal/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.1.0/lib/rake/application.rb:106:in `each'
/Users/monicacardinal/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.1.0/lib/rake/application.rb:106:in `block in top_level'
/Users/monicacardinal/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.1.0/lib/rake/application.rb:115:in `run_with_threads'
/Users/monicacardinal/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.1.0/lib/rake/application.rb:100:in `top_level'
/Users/monicacardinal/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.1.0/lib/rake/application.rb:78:in `block in run'
/Users/monicacardinal/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.1.0/lib/rake/application.rb:165:in `standard_exception_handling'
/Users/monicacardinal/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.1.0/lib/rake/application.rb:75:in `run'
/Users/monicacardinal/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.1.0/bin/rake:33:in `<top (required)>'
/Users/monicacardinal/.rvm/gems/ruby-2.0.0-p247/bin/rake:23:in `load'
/Users/monicacardinal/.rvm/gems/ruby-2.0.0-p247/bin/rake:23:in `<main>'
vera:bloccit monicacardinal$ gem update rails
Updating installed gems
Nothing to update
vera:bloccit monicacardinal$ cd ..
vera:code monicacardinal$ rails s
Usage:
rails new APP_PATH [options]
Options:
-r, [--ruby=PATH] # Path to the Ruby binary of your choice
# Default: /Users/monicacardinal/.rvm/rubies/ruby-2.0.0-p247/bin/ruby
-m, [--template=TEMPLATE] # Path to some application template (can be a filesystem path or URL)
[--skip-gemfile] # Don't create a Gemfile
-B, [--skip-bundle] # Don't run bundle install
-G, [--skip-git] # Skip .gitignore file
[--skip-keeps] # Skip source control .keep files
-O, [--skip-active-record] # Skip Active Record files
-S, [--skip-sprockets] # Skip Sprockets files
-d, [--database=DATABASE] # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc)
# Default: sqlite3
-j, [--javascript=JAVASCRIPT] # Preconfigure for selected JavaScript library
# Default: jquery
-J, [--skip-javascript] # Skip JavaScript files
[--dev] # Setup the application with Gemfile pointing to your Rails checkout
[--edge] # Setup the application with Gemfile pointing to Rails repository
-T, [--skip-test-unit] # Skip Test::Unit files
[--rc=RC] # Path to file containing extra configuration options for rails command
[--no-rc] # Skip loading of extra configuration options from .railsrc file
Runtime options:
-f, [--force] # Overwrite files that already exist
-p, [--pretend] # Run but do not make any changes
-q, [--quiet] # Suppress status output
-s, [--skip] # Skip files that already exist
Rails options:
-h, [--help] # Show this help message and quit
-v, [--version] # Show Rails version number and quit
Description:
The 'rails new' command creates a new Rails application with a default
directory structure and configuration at the path you specify.
You can specify extra command-line arguments to be used every time
'rails new' runs in the .railsrc configuration file in your home directory.
Note that the arguments specified in the .railsrc file don't affect the
defaults values shown above in this help message.
Example:
rails new ~/Code/Ruby/weblog
This generates a skeletal Rails installation in ~/Code/Ruby/weblog.
See the README in the newly created application to get going.
vera:code monicacardinal$ clear
vera:code monicacardinal$ pwd
/Users/monicacardinal/code
vera:code monicacardinal$ ls -a
. bloccit first-repo-c9 js
.. first-app first_node_app rails-dev-box
.DS_Store first-app-c9 git_test ruby
vera:code monicacardinal$ cd bloccit/
vera:bloccit monicacardinal$ rails s
Usage:
rails new APP_PATH [options]
Options:
-r, [--ruby=PATH] # Path to the Ruby binary of your choice
# Default: /Users/monicacardinal/.rvm/rubies/ruby-2.0.0-p247/bin/ruby
-b, [--builder=BUILDER] # Path to a application builder (can be a filesystem path or URL)
-m, [--template=TEMPLATE] # Path to an application template (can be a filesystem path or URL)
[--skip-gemfile] # Don't create a Gemfile
[--skip-bundle] # Don't run bundle install
-G, [--skip-git] # Skip Git ignores and keeps
-O, [--skip-active-record] # Skip Active Record files
-S, [--skip-sprockets] # Skip Sprockets files
-d, [--database=DATABASE] # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc)
# Default: sqlite3
-j, [--javascript=JAVASCRIPT] # Preconfigure for selected JavaScript library
# Default: jquery
-J, [--skip-javascript] # Skip JavaScript files
[--dev] # Setup the application with Gemfile pointing to your Rails checkout
[--edge] # Setup the application with Gemfile pointing to Rails repository
-T, [--skip-test-unit] # Skip Test::Unit files
[--old-style-hash] # Force using old style hash (:foo => 'bar') on Ruby >= 1.9
Runtime options:
-f, [--force] # Overwrite files that already exist
-p, [--pretend] # Run but do not make any changes
-q, [--quiet] # Suppress status output
-s, [--skip] # Skip files that already exist
Rails options:
-h, [--help] # Show this help message and quit
-v, [--version] # Show Rails version number and quit
Description:
The 'rails new' command creates a new Rails application with a default
directory structure and configuration at the path you specify.
You can specify extra command-line arguments to be used every time
'rails new' runs in the .railsrc configuration file in your home directory.
Note that the arguments specified in the .railsrc file don't affect the
defaults values shown above in this help message.
Example:
rails new ~/Code/Ruby/weblog
This generates a skeletal Rails installation in ~/Code/Ruby/weblog.
See the README in the newly created application to get going.
vera:bloccit monicacardinal$ clear
vera:bloccit monicacardinal$ rails generate model test
Usage:
rails new APP_PATH [options]
Options:
-r, [--ruby=PATH] # Path to the Ruby binary of your choice
# Default: /Users/monicacardinal/.rvm/rubies/ruby-2.0.0-p247/bin/ruby
-b, [--builder=BUILDER] # Path to a application builder (can be a filesystem path or URL)
-m, [--template=TEMPLATE] # Path to an application template (can be a filesystem path or URL)
[--skip-gemfile] # Don't create a Gemfile
[--skip-bundle] # Don't run bundle install
-G, [--skip-git] # Skip Git ignores and keeps
-O, [--skip-active-record] # Skip Active Record files
-S, [--skip-sprockets] # Skip Sprockets files
-d, [--database=DATABASE] # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc)
# Default: sqlite3
-j, [--javascript=JAVASCRIPT] # Preconfigure for selected JavaScript library
# Default: jquery
-J, [--skip-javascript] # Skip JavaScript files
[--dev] # Setup the application with Gemfile pointing to your Rails checkout
[--edge] # Setup the application with Gemfile pointing to Rails repository
-T, [--skip-test-unit] # Skip Test::Unit files
[--old-style-hash] # Force using old style hash (:foo => 'bar') on Ruby >= 1.9
Runtime options:
-f, [--force] # Overwrite files that already exist
-p, [--pretend] # Run but do not make any changes
-q, [--quiet] # Suppress status output
-s, [--skip] # Skip files that already exist
Rails options:
-h, [--help] # Show this help message and quit
-v, [--version] # Show Rails version number and quit
Description:
The 'rails new' command creates a new Rails application with a default
directory structure and configuration at the path you specify.
You can specify extra command-line arguments to be used every time
'rails new' runs in the .railsrc configuration file in your home directory.
Note that the arguments specified in the .railsrc file don't affect the
defaults values shown above in this help message.
Example:
rails new ~/Code/Ruby/weblog
This generates a skeletal Rails installation in ~/Code/Ruby/weblog.
See the README in the newly created application to get going.
vera:bloccit monicacardinal$ clear
vera:bloccit monicacardinal$ rails -v
Rails 3.2.12
vera:bloccit monicacardinal$ gem uninstall rails
Select gem to uninstall:
1. rails-3.2.12
2. rails-4.0.1
3. All versions
> 3
Successfully uninstalled rails-3.2.12
Successfully uninstalled rails-4.0.1
vera:bloccit monicacardinal$ gem install rails
Fetching: rails-4.0.1.gem (100%)
Successfully installed rails-4.0.1
Installing ri documentation for rails-4.0.1
1 gem installed
vera:bloccit monicacardinal$ rails -v
Could not find rails-3.2.12 in any of the sources
Run `bundle install` to install missing gems.
vera:bloccit monicacardinal$ bundle install
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Using rake (10.1.0)
Using i18n (0.6.5)
Using multi_json (1.8.2)
Using activesupport (3.2.12)
Using builder (3.0.4)
Using activemodel (3.2.12)
Using erubis (2.7.0)
Using journey (1.0.4)
Using rack (1.4.5)
Using rack-cache (1.2)
Using rack-test (0.6.2)
Using hike (1.2.3)
Using tilt (1.4.1)
Using sprockets (2.2.2)
Using actionpack (3.2.12)
Using mime-types (1.25.1)
Using polyglot (0.3.3)
Using treetop (1.4.15)
Using mail (2.4.4)
Using actionmailer (3.2.12)
Using arel (3.0.3)
Using tzinfo (0.3.38)
Using activerecord (3.2.12)
Using activeresource (3.2.12)
Using sass (3.2.12)
Using bootstrap-sass (2.3.1.3)
Using coffee-script-source (1.6.3)
Using execjs (2.0.2)
Using coffee-script (2.2.0)
Using rack-ssl (1.3.3)
Using json (1.8.1)
Using rdoc (3.12.2)
Using thor (0.18.1)
Using railties (3.2.12)
Using coffee-rails (3.2.2)
Using jbuilder (1.5.2)
Using jquery-rails (3.0.4)
Using pg (0.17.0)
Using bundler (1.3.5)
Installing rails (3.2.12)
Using sass-rails (3.2.6)
Using sdoc (0.3.20)
Using sqlite3 (1.3.8)
Using turbolinks (1.3.1)
Using uglifier (2.3.1)
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
vera:bloccit monicacardinal$ rails -v
Rails 3.2.12
vera:bloccit monicacardinal$ rails s
Usage:
rails new APP_PATH [options]
Options:
-r, [--ruby=PATH] # Path to the Ruby binary of your choice
# Default: /Users/monicacardinal/.rvm/rubies/ruby-2.0.0-p247/bin/ruby
-b, [--builder=BUILDER] # Path to a application builder (can be a filesystem path or URL)
-m, [--template=TEMPLATE] # Path to an application template (can be a filesystem path or URL)
[--skip-gemfile] # Don't create a Gemfile
[--skip-bundle] # Don't run bundle install
-G, [--skip-git] # Skip Git ignores and keeps
-O, [--skip-active-record] # Skip Active Record files
-S, [--skip-sprockets] # Skip Sprockets files
-d, [--database=DATABASE] # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc)
# Default: sqlite3
-j, [--javascript=JAVASCRIPT] # Preconfigure for selected JavaScript library
# Default: jquery
-J, [--skip-javascript] # Skip JavaScript files
[--dev] # Setup the application with Gemfile pointing to your Rails checkout
[--edge] # Setup the application with Gemfile pointing to Rails repository
-T, [--skip-test-unit] # Skip Test::Unit files
[--old-style-hash] # Force using old style hash (:foo => 'bar') on Ruby >= 1.9
Runtime options:
-f, [--force] # Overwrite files that already exist
-p, [--pretend] # Run but do not make any changes
-q, [--quiet] # Suppress status output
-s, [--skip] # Skip files that already exist
Rails options:
-h, [--help] # Show this help message and quit
-v, [--version] # Show Rails version number and quit
Description:
The 'rails new' command creates a new Rails application with a default
directory structure and configuration at the path you specify.
You can specify extra command-line arguments to be used every time
'rails new' runs in the .railsrc configuration file in your home directory.
Note that the arguments specified in the .railsrc file don't affect the
defaults values shown above in this help message.
Example:
rails new ~/Code/Ruby/weblog
This generates a skeletal Rails installation in ~/Code/Ruby/weblog.
See the README in the newly created application to get going.
vera:bloccit monicacardinal$ gem uninstall rails
Select gem to uninstall:
1. rails-3.2.12
2. rails-4.0.1
3. All versions
> 2
Successfully uninstalled rails-4.0.1
vera:bloccit monicacardinal$ rails -v
Rails 3.2.12
vera:bloccit monicacardinal$ rails s
Usage:
rails new APP_PATH [options]
Options:
-r, [--ruby=PATH] # Path to the Ruby binary of your choice
# Default: /Users/monicacardinal/.rvm/rubies/ruby-2.0.0-p247/bin/ruby
-b, [--builder=BUILDER] # Path to a application builder (can be a filesystem path or URL)
-m, [--template=TEMPLATE] # Path to an application template (can be a filesystem path or URL)
[--skip-gemfile] # Don't create a Gemfile
[--skip-bundle] # Don't run bundle install
-G, [--skip-git] # Skip Git ignores and keeps
-O, [--skip-active-record] # Skip Active Record files
-S, [--skip-sprockets] # Skip Sprockets files
-d, [--database=DATABASE] # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc)
# Default: sqlite3
-j, [--javascript=JAVASCRIPT] # Preconfigure for selected JavaScript library
# Default: jquery
-J, [--skip-javascript] # Skip JavaScript files
[--dev] # Setup the application with Gemfile pointing to your Rails checkout
[--edge] # Setup the application with Gemfile pointing to Rails repository
-T, [--skip-test-unit] # Skip Test::Unit files
[--old-style-hash] # Force using old style hash (:foo => 'bar') on Ruby >= 1.9
Runtime options:
-f, [--force] # Overwrite files that already exist
-p, [--pretend] # Run but do not make any changes
-q, [--quiet] # Suppress status output
-s, [--skip] # Skip files that already exist
Rails options:
-h, [--help] # Show this help message and quit
-v, [--version] # Show Rails version number and quit
Description:
The 'rails new' command creates a new Rails application with a default
directory structure and configuration at the path you specify.
You can specify extra command-line arguments to be used every time
'rails new' runs in the .railsrc configuration file in your home directory.
Note that the arguments specified in the .railsrc file don't affect the
defaults values shown above in this help message.
Example:
rails new ~/Code/Ruby/weblog
This generates a skeletal Rails installation in ~/Code/Ruby/weblog.
See the README in the newly created application to get going.
vera:bloccit monicacardinal$ gem uninstall rails
Successfully uninstalled rails-3.2.12
vera:bloccit monicacardinal$ gem install rails
Fetching: rails-4.0.1.gem (100%)
Successfully installed rails-4.0.1
1 gem installed
vera:bloccit monicacardinal$ rails -v
Could not find rails-3.2.12 in any of the sources
Run `bundle install` to install missing gems.
vera:bloccit monicacardinal$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment