learn-co-students / rails-resource-and-scaffold-generator-v-000 Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
Array values in the parameter to Gem.paths=
are deprecated.
Please use a String or nil.
Fixed by applying the same join you see here to the line 11 of bin/spring:
Gem.paths = { 'GEM_PATH' => [Bundler.bundle_path.to_s, *Gem.path].uniq.join(File::PATH_SEPARATOR) }
I had 2 errors trying to get this lab to work, I managed to fix so thought I'd share. Below are both errors along with the solution for each.
Occurs: when running bundle install
Error:
Installing json 1.8.3 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension......
.................
.................
An error occurred while installing json (1.8.3), and Bundler cannot
continue.
Make sure that `gem install json -v '1.8.3' --source 'https://rubygems.org/'`
succeeds before bundling.
In Gemfile:
rails was resolved to 4.2.5, which depends on
actionmailer was resolved to 4.2.5, which depends on
actionpack was resolved to 4.2.5, which depends on
actionview was resolved to 4.2.5, which depends on
rails-dom-testing was resolved to 1.0.7, which depends on
rails-deprecated_sanitizer was resolved to 1.0.3, which depends on
activesupport was resolved to 4.2.5, which depends on
json
Solution:
delete Gemfile.lock
file
run gem install json
after this bundle install
will work without errors but do not run it yet, there is a second error some may get. To address both in one shot follow solution below WITHOUT running bundle install
Occurs: when running rails g scaffold Article title:string body:text
from lab
error: terminal hangs/freezes
solution:
I tried some solutions I found online that did not require updating rails version but had no luck so if anyone has any additional info on this would love to see.
delete all your rails versions gem uninstall rails
if prompted select all
You might still have rails in your global gems as I did so double check by running gem list rails
if you see any listed run gem uninstall rails [version.number]
you might get an error but terminal will provide correct command to execute that next uninstall correctly
once all rails versions are uninstalled in your Gemfile
change gem 'rails', '4.2.5'
to gem 'rails'
, save changes to file, then run bundle install
run rails -v
and make sure version is greater than 5.... eg. Rails 5.0.7
delete your entire bin
directory/folder
run rake app:update:bin
after this scaffold generator command should work
Due to issues beyond my understanding I'm unable to complete this lab. I have tried working through errors however nothing that I've read or that has been suggested will allow completion of this lab.
I am unable to run the scaffold command. I have received errors regarding the spring gem and after attempting fixes using suggestions on stackoverflow and GitHub issue queues it's taken too much time to continue to try and figure out the issue. I am able to create a new rails app and run the scaffold using the new app but the lab is not run-able in it's current state on my computer.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.