Giter Site home page Giter Site logo

rails-resource-and-scaffold-generator-v-000's People

Contributors

annjohn avatar franknowinski avatar jordanhudgens avatar maxwellbenton avatar mendelb avatar preetness avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rails-resource-and-scaffold-generator-v-000's Issues

Error

Array values in the parameter to Gem.paths= are deprecated.
Please use a String or nil.

rubygems/rubygems#1551

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) }

json BuildError + terminal hang on scaffold comand

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.


ERROR 1

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:

  1. delete Gemfile.lock file

  2. 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


ERROR 2

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.

  1. delete all your rails versions gem uninstall rails
    if prompted select all

  2. 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

  3. 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

  4. run rails -v and make sure version is greater than 5.... eg. Rails 5.0.7

  5. delete your entire bin directory/folder

  6. run rake app:update:bin

after this scaffold generator command should work


@mendelB

Unable to complete lab

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.