`auth_data=': couldn't set additional authenticated data (OpenSSL::Cipher::CipherError) - ruby

trying to create a new project on RoR and i get this error:
/Library/Ruby/Gems/2.6.0/gems/activesupport-6.1.6.1/lib/active_support/message_encryptor.rb:170:in `auth_data=': couldn't set additional authenticated data (OpenSSL::Cipher::CipherError)
from /Library/Ruby/Gems/2.6.0/gems/activesupport-6.1.6.1/lib/active_support/message_encryptor.rb:170:in `_encrypt'
from /Library/Ruby/Gems/2.6.0/gems/activesupport-6.1.6.1/lib/active_support/message_encryptor.rb:148:in `encrypt_and_sign'
from /Library/Ruby/Gems/2.6.0/gems/activesupport-6.1.6.1/lib/active_support/encrypted_file.rb:88:in `encrypt'
from /Library/Ruby/Gems/2.6.0/gems/activesupport-6.1.6.1/lib/active_support/encrypted_file.rb:61:in `write'
from /Library/Ruby/Gems/2.6.0/gems/activesupport-6.1.6.1/lib/active_support/encrypted_configuration.rb:29:in `write'
from /Users/carolinecagnin/.gem/ruby/2.6.0/gems/railties-6.1.6.1/lib/rails/generators/rails/credentials/credentials_generator.rb:30:in `add_credentials_file_silently'
from /Users/carolinecagnin/.gem/ruby/2.6.0/gems/railties-6.1.6.1/lib/rails/generators/rails/app/app_generator.rb:194:in `credentials'
from /Users/carolinecagnin/.gem/ruby/2.6.0/gems/railties-6.1.6.1/lib/rails/generators/app_base.rb:165:in `public_send'
from /Users/carolinecagnin/.gem/ruby/2.6.0/gems/railties-6.1.6.1/lib/rails/generators/app_base.rb:165:in `build'
from /Users/carolinecagnin/.gem/ruby/2.6.0/gems/railties-6.1.6.1/lib/rails/generators/rails/app/app_generator.rb:386:in `create_credentials'
from /Users/carolinecagnin/.gem/ruby/2.6.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
from /Users/carolinecagnin/.gem/ruby/2.6.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
from /Users/carolinecagnin/.gem/ruby/2.6.0/gems/thor-1.2.1/lib/thor/invocation.rb:134:in `block in invoke_all'
from /Users/carolinecagnin/.gem/ruby/2.6.0/gems/thor-1.2.1/lib/thor/invocation.rb:134:in `each'
from /Users/carolinecagnin/.gem/ruby/2.6.0/gems/thor-1.2.1/lib/thor/invocation.rb:134:in `map'
from /Users/carolinecagnin/.gem/ruby/2.6.0/gems/thor-1.2.1/lib/thor/invocation.rb:134:in `invoke_all'
from /Users/carolinecagnin/.gem/ruby/2.6.0/gems/thor-1.2.1/lib/thor/group.rb:232:in `dispatch'
from /Users/carolinecagnin/.gem/ruby/2.6.0/gems/thor-1.2.1/lib/thor/base.rb:485:in `start'
from /Users/carolinecagnin/.gem/ruby/2.6.0/gems/railties-6.1.6.1/lib/rails/commands/application/application_command.rb:26:in `perform'
from /Users/carolinecagnin/.gem/ruby/2.6.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
from /Users/carolinecagnin/.gem/ruby/2.6.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
from /Users/carolinecagnin/.gem/ruby/2.6.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
from /Users/carolinecagnin/.gem/ruby/2.6.0/gems/railties-6.1.6.1/lib/rails/command/base.rb:69:in `perform'
from /Users/carolinecagnin/.gem/ruby/2.6.0/gems/railties-6.1.6.1/lib/rails/command.rb:48:in `invoke'
from /Users/carolinecagnin/.gem/ruby/2.6.0/gems/railties-6.1.6.1/lib/rails/cli.rb:18:in `<top (required)>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:65:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:65:in `require'
from /Users/carolinecagnin/.gem/ruby/2.6.0/gems/railties-6.1.6.1/exe/rails:10:in `<top (required)>'
from /usr/bin/rails:22:in `load'
from /usr/bin/rails:22:in `<main>'
Tried almost everything i found on internet and still can't solve it... I'm just trying to study lol I also use mac OS Monterey

Related

not able to run rails app locally

Hello i am fairly new to rails and i have a rails app which use to run normally before, recently when i am trying to to command rails s on my machine it throws me method_missing': undefined method web_console' error. I am totally lost. here is the log
rails s
=> Booting Puma
=> Rails 5.0.7 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
Exiting
/Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.0.7/lib/rails/railtie/configuration.rb:95:in `method_missing': undefined method `web_console' for #<Rails::Application::Configuration:0x007fa04bb518f8> (NoMethodError)
Did you mean? console
from /Users/mohammedsayerwala/Documents/Aqua/config/environments/development.rb:24:in `block in <top (required)>'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.0.7/lib/rails/railtie.rb:209:in `instance_eval'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.0.7/lib/rails/railtie.rb:209:in `configure'
from /Users/mohammedsayerwala/Documents/Aqua/config/environments/development.rb:1:in `<top (required)>'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.0.7/lib/active_support/dependencies.rb:293:in `require'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.0.7/lib/active_support/dependencies.rb:293:in `block in require'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.0.7/lib/active_support/dependencies.rb:259:in `load_dependency'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.0.7/lib/active_support/dependencies.rb:293:in `require'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.0.7/lib/rails/engine.rb:600:in `block (2 levels) in <class:Engine>'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.0.7/lib/rails/engine.rb:599:in `each'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.0.7/lib/rails/engine.rb:599:in `block in <class:Engine>'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.0.7/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.0.7/lib/rails/initializable.rb:30:in `run'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.0.7/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/2.4.0/tsort.rb:228:in `block in tsort_each'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/2.4.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/2.4.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/2.4.0/tsort.rb:431:in `each_strongly_connected_component_from'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/2.4.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.0.7/lib/rails/initializable.rb:44:in `each'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.0.7/lib/rails/initializable.rb:44:in `tsort_each_child'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/2.4.0/tsort.rb:415:in `call'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/2.4.0/tsort.rb:415:in `each_strongly_connected_component_from'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/2.4.0/tsort.rb:349:in `block in each_strongly_connected_component'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/2.4.0/tsort.rb:347:in `each'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/2.4.0/tsort.rb:347:in `call'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/2.4.0/tsort.rb:347:in `each_strongly_connected_component'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/2.4.0/tsort.rb:226:in `tsort_each'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/2.4.0/tsort.rb:205:in `tsort_each'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.0.7/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.0.7/lib/rails/application.rb:352:in `initialize!'
from /Users/mohammedsayerwala/Documents/Aqua/config/environment.rb:5:in `<top (required)>'
from /Users/mohammedsayerwala/Documents/Aqua/config.ru:3:in `require_relative'
from /Users/mohammedsayerwala/Documents/Aqua/config.ru:3:in `block in <main>'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rack-2.0.5/lib/rack/builder.rb:55:in `instance_eval'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rack-2.0.5/lib/rack/builder.rb:55:in `initialize'
from /Users/mohammedsayerwala/Documents/Aqua/config.ru:in `new'
from /Users/mohammedsayerwala/Documents/Aqua/config.ru:in `<main>'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rack-2.0.5/lib/rack/builder.rb:49:in `eval'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rack-2.0.5/lib/rack/builder.rb:49:in `new_from_string'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rack-2.0.5/lib/rack/builder.rb:40:in `parse_file'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rack-2.0.5/lib/rack/server.rb:319:in `build_app_and_options_from_config'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rack-2.0.5/lib/rack/server.rb:219:in `app'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.0.7/lib/rails/commands/server.rb:84:in `app'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rack-2.0.5/lib/rack/server.rb:354:in `wrapped_app'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.0.7/lib/rails/commands/server.rb:148:in `log_to_stdout'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.0.7/lib/rails/commands/server.rb:102:in `start'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.0.7/lib/rails/commands/commands_tasks.rb:90:in `block in server'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.0.7/lib/rails/commands/commands_tasks.rb:85:in `tap'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.0.7/lib/rails/commands/commands_tasks.rb:85:in `server'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.0.7/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.0.7/lib/rails/commands.rb:18:in `<top (required)>'
from /Users/mohammedsayerwala/Documents/Aqua/bin/rails:9:in `require'
from /Users/mohammedsayerwala/Documents/Aqua/bin/rails:9:in `<top (required)>'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:68:in `require'
from /Users/mohammedsayerwala/.rbenv/versions/2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:68:in `require'
from /Users/mohammedsayerwala/Documents/Aqua/bin/spring:14:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
I am using rails 5.0.7 version and ruby 2.4.0
i tried doing spring stop and even commenting the spring gem inside the gemfile but nothing worked.
Thanks for the help in advance
I have solved the issue, though i was using the new backup directory i had the rsa key in ssh-add because of capistrano previous deployment try's once i removed that and tried to run it things ran normally

Web application could not be started undefined method

When I installed redmine-3.3 & 3.4 , I am not getting redmine page
I am facing this Error
Web application could not be started
undefined method `require_sudo_mode' for EmailAddressesController:Class (NoMethodError)
/usr/share/redmine/app/controllers/email_addresses_controller.rb:21:in `<class:EmailAddressesController>'
/usr/share/redmine/app/controllers/email_addresses_controller.rb:18:in `<top (required)>'
/usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:251:in `require'
/usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:251:in `block in require'
/usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:236:in `load_dependency'
/usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:251:in `require'
/usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:359:in `require_or_load'
/usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:313:in `depend_on'
/usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:225:in `require_dependency'
/usr/lib/ruby/vendor_ruby/rails/engine.rb:444:in `block (2 levels) in eager_load!'
/usr/lib/ruby/vendor_ruby/rails/engine.rb:443:in `each'
/usr/lib/ruby/vendor_ruby/rails/engine.rb:443:in `block in eager_load!'
/usr/lib/ruby/vendor_ruby/rails/engine.rb:441:in `each'
/usr/lib/ruby/vendor_ruby/rails/engine.rb:441:in `eager_load!'
/usr/lib/ruby/vendor_ruby/rails/application/finisher.rb:53:in `block in <module:Finisher>'
/usr/lib/ruby/vendor_ruby/rails/initializable.rb:30:in `instance_exec'
/usr/lib/ruby/vendor_ruby/rails/initializable.rb:30:in `run'
/usr/lib/ruby/vendor_ruby/rails/initializable.rb:55:in `block in run_initializers'
/usr/lib/ruby/vendor_ruby/rails/initializable.rb:54:in `each'
/usr/lib/ruby/vendor_ruby/rails/initializable.rb:54:in `run_initializers'
/usr/lib/ruby/vendor_ruby/rails/application.rb:136:in `initialize!'
/usr/lib/ruby/vendor_ruby/rails/railtie/configurable.rb:30:in `method_missing'
/usr/share/redmine/config/environment.rb:14:in `<top (required)>'
config.ru:3:in `require'
config.ru:3:in `block in <main>'
/usr/lib/ruby/vendor_ruby/rack/builder.rb:51:in `instance_eval'
/usr/lib/ruby/vendor_ruby/rack/builder.rb:51:in `initialize'
config.ru:1:in `new'
config.ru:1:in `<main>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:112:in `eval'
/usr/share/passenger/helper-scripts/rack-preloader.rb:112:in `preload_app'
/usr/share/passenger/helper-scripts/rack-preloader.rb:158:in `<module:App>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:28:in `<main>'
Application root /usr/share/redmine Environment (value of RAILS_ENV, RACK_ENV, WSGI_ENV and PASSENGER_ENV) production Ruby interpreter
command /usr/bin/ruby.. .... ..
Can you give me suggestions?
Please ensure you'r connected with your database and did you missing any required gem.
require_sudo_mode. If the error comes because of this you definitely missing this gem.
This type of error comes under database not connected issue.If you are fix that this would be start.Thanks..!

rails generate scaffold fails ruby 1.9.3

I'm just getting my feet wet in rails development. Trying to learn from "Head First Rails", which is fairly out of date. But I'm updating the commands to more modern versions of rails.
Anyway, I'm trying to use the rails generate scaffold command and running into the following error:
[root#web1:/var/www/tickets] #rails generate scaffold name:string seat_id_seq:string address:text price_paid:decimal email_address:string
invoke active_record
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/railties-4.1.5/lib/rails/generators/base.rb:258:in `const_defined?': wrong constant name Name:string (NameError)
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/railties-4.1.5/lib/rails/generators/base.rb:258:in `block in class_collisions'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/railties-4.1.5/lib/rails/generators/base.rb:249:in `each'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/railties-4.1.5/lib/rails/generators/base.rb:249:in `class_collisions'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/railties-4.1.5/lib/rails/generators/named_base.rb:200:in `block in check_class_collision'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `block in invoke_all'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `each'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `map'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `invoke_all'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/group.rb:232:in `dispatch'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/invocation.rb:115:in `invoke'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/group.rb:277:in `block in _invoke_for_class_method'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/shell.rb:68:in `with_padding'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/group.rb:266:in `_invoke_for_class_method'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/group.rb:149:in `_invoke_from_option_orm'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `block in invoke_all'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `each'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `map'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `invoke_all'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/group.rb:232:in `dispatch'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/railties-4.1.5/lib/rails/generators.rb:157:in `invoke'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/railties-4.1.5/lib/rails/commands/generate.rb:11:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `block in require'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:232:in `load_dependency'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/railties-4.1.5/lib/rails/commands/commands_tasks.rb:135:in `generate_or_destroy'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/railties-4.1.5/lib/rails/commands/commands_tasks.rb:51:in `generate'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/railties-4.1.5/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/railties-4.1.5/lib/rails/commands.rb:17:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `block in require'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:232:in `load_dependency'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `require'
from /var/www/tickets/bin/rails:8:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:241:in `load'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:241:in `block in load'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:232:in `load_dependency'
from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:241:in `load'
from /usr/local/rvm/rubies/ruby-1.9.3-p547/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/rvm/rubies/ruby-1.9.3-p547/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'
I'm running ruby 1.9.3 via rvm and rails 4 via gem. The server is CentOS 7
I was just wondering if any of you might have run into a similar situation and know how I can get past this error.
Thanks!
Usage:
rails generate scaffold NAME [field[:type][:index] field[:type][:index]] [options]
Examples:
`rails generate scaffold post`
`rails generate scaffold post title body:text published:boolean`
You're not specifying name attribute, (i.e model)

Trouble installing Devise gem

I just attempted installing devise and had some trouble. From previous experience I know that when I install it I am required to do some manual steps. Well this time there where no manual steps but I still did them because I know they had to be done. So everything is working fine but then I run rails g devise: views this returns
/Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/devise-3.2.2/lib/devise/rails/routes.rb:469:in `raise_no_secret_key': Devise.secret_key was not set.
Please add the following to your Devise initializer: (RuntimeError)
config.secret_key = '1ef096dceb32ce5af3b11a7ef99c00ab59b7ad90ed5dbacabe5e8cb8613e437799333b96e2045997d701a1ed1b1fde537b98f6ef1c64d247516b85c9410ad147'
Please ensure you restarted your application after installing Devise or setting the key.
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/devise-3.2.2/lib/devise/rails/routes.rb:203:in `devise_for'
from /Users/henrywyatt/Desktop/pinteresting/config/routes.rb:2:in `block in <top (required)>'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.2/lib/action_dispatch/routing/route_set.rb:341:in `instance_exec'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.2/lib/action_dispatch/routing/route_set.rb:341:in `eval_block'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.2/lib/action_dispatch/routing/route_set.rb:319:in `draw'
from /Users/henrywyatt/Desktop/pinteresting/config/routes.rb:1:in `<top (required)>'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `load'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `block in load'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `load'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:40:in `each'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.2/lib/active_support/file_update_checker.rb:75:in `call'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.2/lib/active_support/file_update_checker.rb:75:in `execute'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:27:in `updater'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:6:in `execute_if_updated'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `run'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/henrywyatt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
from /Users/henrywyatt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
from /Users/henrywyatt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
from /Users/henrywyatt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
from /Users/henrywyatt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/tsort.rb:180:in `each'
from /Users/henrywyatt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
from /Users/henrywyatt/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/application.rb:215:in `initialize!'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/henrywyatt/Desktop/pinteresting/config/environment.rb:5:in `<top (required)>'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/application.rb:189:in `require_environment!'
from /Users/henrywyatt/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/commands.rb:44:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
You need to add
config.secret_key = '1ef096dceb32ce5af3b11a7ef99c00ab59b7ad90ed5dbacabe5e8cb8613e437799333b96e204599‌​7d701a1ed1b1fde537b98f6ef1c64d247516b85c9410ad147'
to your devise file (config/initializers/devise_initializer.rb).
if you are on production dont put this in any config file rather put it as environment variable
rails 4 have one secret.yml file in which there is a line
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
you just need to set ENV["SECRET_KEY_BASE"]
I am not sure but secret key is any string
I too had the same problem
but resolved it after restarting my rails server

Mysql2::Error: Access denied for user 'swapnasa'#'localhost' (using password: NO) (Sequel::DatabaseConnectionError)

I trying to conect a Ruby application to MySQL databases. Every time I get the below error:
/home/swapnasa/.rvm/gems/ruby-1.9.3-p448/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `connect': Mysql2::Error: Access denied for user 'swapnasa'#'localhost' (using password: NO) (Sequel::DatabaseConnectionError)
from /home/swapnasa/.rvm/gems/ruby-1.9.3-p448/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `initialize'
from /home/swapnasa/.rvm/gems/ruby-1.9.3-p448/gems/sequel-3.48.0/lib/sequel/adapters/mysql2.rb:34:in `new'
from /home/swapnasa/.rvm/gems/ruby-1.9.3-p448/gems/sequel-3.48.0/lib/sequel/adapters/mysql2.rb:34:in `connect'
from /home/swapnasa/.rvm/gems/ruby-1.9.3-p448/gems/sequel-3.48.0/lib/sequel/connection_pool.rb:94:in `make_new'
from /home/swapnasa/.rvm/gems/ruby-1.9.3-p448/gems/sequel-3.48.0/lib/sequel/connection_pool/threaded.rb:158:in `make_new'
from /home/swapnasa/.rvm/gems/ruby-1.9.3-p448/gems/sequel-3.48.0/lib/sequel/connection_pool/threaded.rb:137:in `available'
from /home/swapnasa/.rvm/gems/ruby-1.9.3-p448/gems/sequel-3.48.0/lib/sequel/connection_pool/threaded.rb:127:in `block in acquire'
from /home/swapnasa/.rvm/gems/ruby-1.9.3-p448/gems/sequel-3.48.0/lib/sequel/connection_pool/threaded.rb:194:in `block in sync'
from <internal:prelude>:10:in `synchronize'
from /home/swapnasa/.rvm/gems/ruby-1.9.3-p448/gems/sequel-3.48.0/lib/sequel/connection_pool/threaded.rb:194:in `sync'
from /home/swapnasa/.rvm/gems/ruby-1.9.3-p448/gems/sequel-3.48.0/lib/sequel/connection_pool/threaded.rb:126:in `acquire'
from /home/swapnasa/.rvm/gems/ruby-1.9.3-p448/gems/sequel-3.48.0/lib/sequel/connection_pool/threaded.rb:94:in `hold'
from /home/swapnasa/.rvm/gems/ruby-1.9.3-p448/gems/sequel-3.48.0/lib/sequel/database/connecting.rb:235:in `synchronize'
from /home/swapnasa/.rvm/gems/ruby-1.9.3-p448/gems/sequel-3.48.0/lib/sequel/adapters/shared/mysql_prepared_statements.rb:34:in `execute'
from /home/swapnasa/.rvm/gems/ruby-1.9.3-p448/gems/sequel-3.48.0/lib/sequel/dataset/actions.rb:860:in `execute'
from /home/swapnasa/.rvm/gems/ruby-1.9.3-p448/gems/sequel-3.48.0/lib/sequel/adapters/mysql2.rb:159:in `execute'
from /home/swapnasa/.rvm/gems/ruby-1.9.3-p448/gems/sequel-3.48.0/lib/sequel/adapters/mysql2.rb:137:in `fetch_rows'
from /home/swapnasa/.rvm/gems/ruby-1.9.3-p448/gems/sequel-3.48.0/lib/sequel/dataset/actions.rb:156:in `each'
from /home/swapnasa/.rvm/gems/ruby-1.9.3-p448/gems/sequel-3.48.0/lib/sequel/dataset/actions.rb:437:in `map'
from /home/swapnasa/.rvm/gems/ruby-1.9.3-p448/gems/sequel-3.48.0/lib/sequel/dataset/actions.rb:437:in `map'
from /home/swapnasa/.rvm/gems/ruby-1.9.3-p448/gems/sequel-3.48.0/lib/sequel/adapters/shared/mysql.rb:451:in `schema_parse_table'
from /home/swapnasa/.rvm/gems/ruby-1.9.3-p448/gems/sequel-3.48.0/lib/sequel/database/query.rb:197:in `schema'
from /home/swapnasa/.rvm/gems/ruby-1.9.3-p448/gems/sequel-3.48.0/lib/sequel/model/base.rb:795:in `block in get_db_schema'
from /home/swapnasa/.rvm/gems/ruby-1.9.3-p448/gems/sequel-3.48.0/lib/sequel/model/base.rb:719:in `check_non_connection_error'
from /home/swapnasa/.rvm/gems/ruby-1.9.3-p448/gems/sequel-3.48.0/lib/sequel/model/base.rb:795:in `get_db_schema'
from /home/swapnasa/.rvm/gems/ruby-1.9.3-p448/gems/sequel-3.48.0/lib/sequel/model/base.rb:572:in `block in set_dataset'
from /home/swapnasa/.rvm/gems/ruby-1.9.3-p448/gems/sequel-3.48.0/lib/sequel/model/base.rb:719:in `check_non_connection_error'
from /home/swapnasa/.rvm/gems/ruby-1.9.3-p448/gems/sequel-3.48.0/lib/sequel/model/base.rb:572:in `set_dataset'
from /home/swapnasa/.rvm/gems/ruby-1.9.3-p448/gems/sequel-3.48.0/lib/sequel/model.rb:46:in `Model'
from /home/swapnasa/Downloads/irclogger-master/lib/irclogger/message.rb:3:in `<top (required)>'
from /home/swapnasa/Downloads/irclogger-master/lib/irclogger.rb:8:in `require'
from /home/swapnasa/Downloads/irclogger-master/lib/irclogger.rb:8:in `<top (required)>'
from viewer.ru:3:in `require'
from viewer.ru:3:in `block in <main>'
from /home/swapnasa/.rvm/gems/ruby-1.9.3-p448/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
from /home/swapnasa/.rvm/gems/ruby-1.9.3-p448/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
from viewer.ru:1:in `new'
from viewer.ru:1:in `<main>'
from /home/swapnasa/.rvm/gems/ruby-1.9.3-p448/gems/thin-1.5.1/lib/rack/adapter/loader.rb:33:in `eval'
from /home/swapnasa/.rvm/gems/ruby-1.9.3-p448/gems/thin-1.5.1/lib/rack/adapter/loader.rb:33:in `load'
from /home/swapnasa/.rvm/gems/ruby-1.9.3-p448/gems/thin-1.5.1/lib/thin/controllers/controller.rb:181:in `load_rackup_config'
from /home/swapnasa/.rvm/gems/ruby-1.9.3-p448/gems/thin-1.5.1/lib/thin/controllers/controller.rb:71:in `start'
from /home/swapnasa/.rvm/gems/ruby-1.9.3-p448/gems/thin-1.5.1/lib/thin/runner.rb:187:in `run_command'
from /home/swapnasa/.rvm/gems/ruby-1.9.3-p448/gems/thin-1.5.1/lib/thin/runner.rb:152:in `run!'
from /home/swapnasa/.rvm/gems/ruby-1.9.3-p448/gems/thin-1.5.1/bin/thin:6:in `<top (required)>'
from /home/swapnasa/.rvm/gems/ruby-1.9.3-p448/bin/thin:19:in `load'
from /home/swapnasa/.rvm/gems/ruby-1.9.3-p448/bin/thin:19:in `<main>'
Note that I have granted swapnasa#localhost access to the database. Still I am getting this error. What am I doing wrong?

Resources