This repository has been archived by the owner on Dec 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 226
uninitialized constant YAML (NameError) #118
Comments
I am also facing the same issue. Did you find out the problem? |
Yes. In your config/application.rb add require 'yaml' |
I just met the same error as i run |
Brilliant. adding require 'yaml' to the config/application.rb file worked perfectly. |
Thank you, require 'yaml' in application.rb worked for me too. As I'm just learning Ruby, this has helped me so very much. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I was following the exact same steps as mentioned in the docs but im getting this error when i restart my rails server
Exiting
'/home/adavia/.rvm/gems/ruby-2.2.1/gems/private_pub-1.0.3/lib/private_pub.rb:21:in
load_config': uninitialized constant YAML (NameError) from /home/adavia/.rvm/gems/ruby-2.2.1/gems/private_pub-1.0.3/lib/private_pub/engine.rb:8:in
block in class:Engine'from /home/adavia/.rvm/gems/ruby-2.2.1/gems/railties-4.2.1/lib/rails/initializable.rb:30:in
instance_exec' from /home/adavia/.rvm/gems/ruby-2.2.1/gems/railties-4.2.1/lib/rails/initializable.rb:30:in
run'from /home/adavia/.rvm/gems/ruby-2.2.1/gems/railties-4.2.1/lib/rails/initializable.rb:55:in
block in run_initializers' from /home/adavia/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:226:in
block in tsort_each'from /home/adavia/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:348:in
block (2 levels) in each_strongly_connected_component' from /home/adavia/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:429:in
each_strongly_connected_component_from'from /home/adavia/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:347:in
block in each_strongly_connected_component' from /home/adavia/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in
each'from /home/adavia/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in
call' from /home/adavia/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in
each_strongly_connected_component'from /home/adavia/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:224:in
tsort_each' from /home/adavia/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:203:in
tsort_each'from /home/adavia/.rvm/gems/ruby-2.2.1/gems/railties-4.2.1/lib/rails/initializable.rb:54:in
run_initializers' from /home/adavia/.rvm/gems/ruby-2.2.1/gems/railties-4.2.1/lib/rails/application.rb:352:in
initialize!'from /home/adavia/rails/social_chat/config/environment.rb:5:in
<top (required)>' from /home/adavia/rails/social_chat/config.ru:3:in
require'from /home/adavia/rails/social_chat/config.ru:3:in
block in <main>' from /home/adavia/.rvm/gems/ruby-2.2.1/gems/rack-1.6.1/lib/rack/builder.rb:55:in
instance_eval'from /home/adavia/.rvm/gems/ruby-2.2.1/gems/rack-1.6.1/lib/rack/builder.rb:55:in
initialize' from /home/adavia/rails/social_chat/config.ru:in
new'from /home/adavia/rails/social_chat/config.ru:in
<main>' from /home/adavia/.rvm/gems/ruby-2.2.1/gems/rack-1.6.1/lib/rack/builder.rb:49:in
eval'from /home/adavia/.rvm/gems/ruby-2.2.1/gems/rack-1.6.1/lib/rack/builder.rb:49:in
new_from_string' from /home/adavia/.rvm/gems/ruby-2.2.1/gems/rack-1.6.1/lib/rack/builder.rb:40:in
parse_file'from /home/adavia/.rvm/gems/ruby-2.2.1/gems/rack-1.6.1/lib/rack/server.rb:299:in
build_app_and_options_from_config' from /home/adavia/.rvm/gems/ruby-2.2.1/gems/rack-1.6.1/lib/rack/server.rb:208:in
app'from /home/adavia/.rvm/gems/ruby-2.2.1/gems/railties-4.2.1/lib/rails/commands/server.rb:61:in
app' from /home/adavia/.rvm/gems/ruby-2.2.1/gems/rack-1.6.1/lib/rack/server.rb:336:in
wrapped_app'from /home/adavia/.rvm/gems/ruby-2.2.1/gems/railties-4.2.1/lib/rails/commands/server.rb:139:in
log_to_stdout' from /home/adavia/.rvm/gems/ruby-2.2.1/gems/railties-4.2.1/lib/rails/commands/server.rb:78:in
start'from /home/adavia/.rvm/gems/ruby-2.2.1/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:80:in
block in server' from /home/adavia/.rvm/gems/ruby-2.2.1/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:75:in
tap'from /home/adavia/.rvm/gems/ruby-2.2.1/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:75:in
server' from /home/adavia/.rvm/gems/ruby-2.2.1/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:39:in
run_command!'from /home/adavia/.rvm/gems/ruby-2.2.1/gems/railties-4.2.1/lib/rails/commands.rb:17:in
<top (required)>' from bin/rails:4:in
require'from bin/rails:4:in `
The text was updated successfully, but these errors were encountered: