Skip to content

Instantly share code, notes, and snippets.

View naltun's full-sized avatar
🕊️
Free/Libre Software to the rescue

Noah Altunian naltun

🕊️
Free/Libre Software to the rescue
View GitHub Profile
@naltun
naltun / index.php
Last active December 4, 2017 19:14
curl -k --user username:password -H "Accept: application/json" https://mylovely.url.io/api/vms
@naltun
naltun / rs
Created November 15, 2017 13:35
fn clear_screen() {
let output = Command::new("clear").output().unwrap();
println!("{}", String::from_utf8_lossy(&output.stdout));
}
@naltun
naltun / gist:116ffaf8aa4c18ff42fc95d55429035a
Created November 10, 2017 15:33
`bundle exec rails s -b 0.0.0.0 -p 80`
=> Booting Puma
=> Rails 5.0.6 application starting in development on http://0.0.0.0:80
=> Run `rails server -h` for more startup options
** Using session_store: ActionDispatch::Session::MemCacheStore
I, [2017-11-10T15:32:40.722995 #29753] INFO -- : Initializing websocket worker!
Puma starting in single mode...
* Version 3.7.1 (ruby 2.4.1-p111), codename: Snowy Sagebrush
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://0.0.0.0:80
** Invoke evm:db:reset (first_time)
** Invoke evm:db:destroy (first_time)
** Execute evm:db:destroy
** Invoke environment (first_time)
** Execute environment
** Invoke db:drop (first_time)
** Invoke db:load_config (first_time)
** Execute db:load_config
** Invoke db:check_protected_environments (first_time)
** Invoke environment
** Using session_store: ActionDispatch::Session::MemCacheStore
rake aborted!
ActiveRecord::NoEnvironmentInSchemaError:
Environment data not found in the schema. To resolve this issue, run:
bin/rails db:environment:set RAILS_ENV=development
/home/naltun/.rvm/gems/ruby-2.4.1/gems/activerecord-5.0.6/lib/active_record/migration.rb:1277:in `last_stored_environment'
/home/naltun/.rvm/gems/ruby-2.4.1/gems/activerecord-5.0.6/lib/active_record/tasks/database_tasks.rb:48:in `check_protected_environments!'
rake aborted!
ActiveRecord::NoDatabaseError: FATAL: database "vmdb_development" does not exist
/home/naltun/.rvm/gems/ruby-2.4.1/gems/activerecord-5.0.6/lib/active_record/connection_adapters/postgresql_adapter.rb:675:in `rescue in connect'
/home/naltun/.rvm/gems/ruby-2.4.1/gems/activerecord-5.0.6/lib/active_record/connection_adapters/postgresql_adapter.rb:671:in `connect'
/home/naltun/.rvm/gems/ruby-2.4.1/gems/activerecord-5.0.6/lib/active_record/connection_adapters/postgresql_adapter.rb:217:in `initialize'
/home/naltun/manageiq/config/initializers/postgres_required_versions.rb:3:in `initialize'
/home/naltun/.rvm/gems/ruby-2.4.1/gems/activerecord-5.0.6/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in `new'
/home/naltun/.rvm/gems/ruby-2.4.1/gems/activerecord-5.0.6/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in `postgresql_connection'
/home/naltun/.rvm/gems/ruby-2.4.1/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:729:in `new_connec
rake aborted!
Gem::LoadError: You have already activated rake 12.0.0, but your Gemfile requires rake 11.3.0. Prepending `bundle exec` to your command may solve this.
/home/naltun/.rvm/gems/ruby-2.4.1/gems/bundler-1.15.4/lib/bundler/runtime.rb:317:in `check_for_activated_spec!'
/home/naltun/.rvm/gems/ruby-2.4.1/gems/bundler-1.15.4/lib/bundler/runtime.rb:32:in `block in setup'
/home/naltun/.rvm/gems/ruby-2.4.1/gems/bundler-1.15.4/lib/bundler/runtime.rb:27:in `map'
/home/naltun/.rvm/gems/ruby-2.4.1/gems/bundler-1.15.4/lib/bundler/runtime.rb:27:in `setup'
/home/naltun/.rvm/gems/ruby-2.4.1/gems/bundler-1.15.4/lib/bundler.rb:101:in `setup'
/home/naltun/.rvm/gems/ruby-2.4.1/gems/bundler-1.15.4/lib/bundler/setup.rb:9:in `<top (required)>'
/home/naltun/manageiq/config/boot.rb:6:in `<top (required)>'
/home/naltun/manageiq/config/application.rb:1:in `<top (required)>'
Bundler could not find compatible versions for gem "net-ssh":
In Gemfile:
net-ssh (= 3.2.0)
manageiq-gems-pending (> 0) was resolved to 0.1.0, which depends on
net-ssh (~> 4.2.0)
@naltun
naltun / gist:504f9d88d1c304e30f6516f6bbaae04e
Created November 9, 2017 23:39
bin/setup within ManageIQ directory
Bundler could not find compatible versions for gem "net-ssh":
In Gemfile:
net-ssh (= 3.2.0)
manageiq-gems-pending (> 0) was resolved to 0.1.0, which depends on
net-ssh (~> 4.2.0)
Bundler could not find compatible versions for gem "rails":
In Gemfile:
jquery-rjs (= 0.1.1) was resolved to 0.1.1, which depends on