[Rails] [SOLVED] Re: Still getting ENOENT error `initialize': No such file or directory @ rb_sysopen
Ruby on Rails
Tuesday, January 22, 2019
It's been a decade since I coded Rails (though Ruby much more recently; there is no excuse). Colin, you were right
file_location = '/home/din/Projects/DLC/rails_server/product_exchange/db/migrate/'
files = File.new '/home/din/Projects/DLC/code_ruby/update_users_01.txt'
migrate_user_files = files.readlines
migrate_user_files.each do | user_file_name |
migration = File.new '/home/din/Projects/DLC/rails_server/product_exchange/db/migrate/' + user_file_name.chomp
# Error was very simple: mystring.chomp returns a new string without the linefeed character ^^^^^^^^^^^^^^^^^^^^^^
# I had interpreted it as modify-in-place
lines = migration.readlines
lines.each do | l |
puts " " + l
end
end
lines.each do | l |
puts " " + l
end
end
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/fdb7c933-e7b6-4648-8928-7dd30b8b91d0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment