0

This is what is currently in my terminal. After Successfully setting up a rails app and making sure it worked. I set up the gem react-rails in my gem file. Then committed everything and from there I ran bundle install. Then I got an error stating that it could not find the babel-source-5.8.35 in any of the sources. but clearly its in my bundle ENV

➜  calendaract git:(master) bundle install
Using rake 12.3.1
Using concurrent-ruby 1.0.5
Using i18n 0.9.5
Using minitest 5.11.3
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Using builder 3.2.3
Using erubi 1.7.1
Using mini_portile2 2.3.0
Using nokogiri 1.8.2
Using rails-dom-testing 2.0.3
Using crass 1.0.3
Using loofah 2.2.2
Using rails-html-sanitizer 1.0.4
Using actionview 5.1.5
Using rack 2.0.4
Using rack-test 0.8.3
Using actionpack 5.1.5
Using nio4r 2.3.0
Using websocket-extensions 0.1.3
Using websocket-driver 0.6.5
Using actioncable 5.1.5
Using globalid 0.4.1
Using activejob 5.1.5
Using mini_mime 1.0.0
Using mail 2.7.0
Using actionmailer 5.1.5
Using activemodel 5.1.5
Using arel 8.0.0
Using activerecord 5.1.5
Using public_suffix 3.0.2
Using addressable 2.5.2
***Using babel-source 5.8.35***
Using execjs 2.7.0
Using babel-transpiler 0.7.0
Using bindex 0.5.0
Using bundler 1.16.1
Using byebug 10.0.1
Using xpath 3.0.0
Using capybara 2.18.0
Using ffi 1.9.23
Using childprocess 0.9.0
Using coffee-script-source 1.12.2
Using coffee-script 2.4.1
Using method_source 0.9.0
Using thor 0.20.0
Using railties 5.1.5
Using coffee-rails 4.2.2
Using connection_pool 2.2.1
Using multi_json 1.13.1
Using jbuilder 2.7.0
Using rb-fsevent 0.10.3 
Using rb-inotify 0.9.10
Using ruby_dep 1.5.0
Using listen 3.1.5
Using pg 1.0.0
Using puma 3.11.3
Using sprockets 3.7.1
Using sprockets-rails 3.2.1
Using rails 5.1.5
Using tilt 2.0.8
Using react-rails 2.4.4
Using rubyzip 1.2.1
Using sass-listen 4.0.0
Using sass 3.5.6
Using sass-rails 5.0.7
Using selenium-webdriver 3.11.0
Using spring 2.0.2
Using spring-watcher-listen 2.0.1
Using turbolinks-source 5.1.0
Using turbolinks 5.1.0
Using uglifier 4.1.8
Using web-console 3.5.1
Bundle complete! 17 Gemfile dependencies, 74 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.

➜  calendaract git:(master) rails g react:install
Could not find babel-source-5.8.35 in any of the sources
Run `bundle install` to install missing gems.

So I Run bundle install, and clearly see my gem available locally all my paths and shims are set correctly. But when I run the generate script i get cannot find babel-source 5.8.35 and would love some help on what to do to be able to run?

rails generate react:install
Gid
  • 1
  • 1
  • do you have gem `webpacker` in your gem list ? just make sure you followed all steps in this docs [react-rail](https://github.com/reactjs/react-rails). – Vishal Taj PM Mar 24 '18 at 03:31
  • yes, I do now and also did the first installation for webpacker and got the same issue – Gid Mar 24 '18 at 04:18
  • try add `babel-source` inside your gemfile just above `react-rails` of try installing that gem manually `gem install babel-source` and try bundle install again – Vishal Taj PM Mar 24 '18 at 04:29

1 Answers1

0

It seems when you trying to do bundle install dependency for react-rails is missing so you need to either add babel-source to the Gemfile file list or install manually.

before starting check if that gem exist in your gem list:

gem list|grep babel-source # grep for ubuntu users you can use other alternative for other OS

and check whether it showing that gem and it is returning correct version or not else retry bundle install again as follows:

At first i suggest you to follow react github doc just make sure you haven't missed anything from it. if you still facing problem after that try adding that dependency gem as follows:

inside your Gemfile you can add this just above react-rails so that it meets the dependency when it tries to install. just make sure to remove Gemfile.lock so that it will be fresh installation.

gem 'babel-source', '~> 5.8.35'

then

bundle install

check whether your log and confirm your facing that error again or not if your facing again try manually you can run this in terminal:

gem install babel-source -v 5.8.35

then

bundle install

if it is successful run generate command for React.

all the above commands are debugging process since i cannot add much details into the comment option i'm posting it here so please let me know the results of it

Vishal Taj PM
  • 1,339
  • 11
  • 23