Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Lee Hughes
8,380 PointsProblems when trying to generate scaffold
I'm trying to build my own CMS in Ruby and running into a strange error which I can't figure out.
I'm trying to generate a scaffold using: rails generate scaffold post
While I get a list of files it created, they don't show in sublime text but I'm getting this error just after I enter rails generate scaffold post.
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord- 3.2.12/lib/active_record/connection_adapters/abstract/connection_specification.rb:35:in `resolve_string_connection': undefined method `fetch' for "†# SQLite version 3.x":String (NoMethodError)
I've searched for this file and the section it is referencing is
private
def resolve_string_connection(spec) # :nodoc:
hash = configurations.fetch(spec) do |k|
connection_url_to_hash(k)
end
with hash = configurations.fetch(spec) do |k| being line 35.
I'm assuming this could be a reason why the files aren't showing in Sublime Text. If that's the case, how do I fix this error?
Cheers.
1 Answer
Jason Seifer
Treehouse Guest TeacherCan you paste a link to your code up on GitHub? That will help us troubleshoot.
Lee Hughes
8,380 PointsLee Hughes
8,380 PointsHi Jason Seifer, since I didn't have much work done to the project I installed rails app and working from that. I'm not getting the error any more so everything is working now.
Thanks though.