Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

couldn't find file 'typed' with type 'application/javascript' #2

Open
nonafiona opened this issue Jul 31, 2017 · 5 comments
Open

couldn't find file 'typed' with type 'application/javascript' #2

nonafiona opened this issue Jul 31, 2017 · 5 comments

Comments

@nonafiona
Copy link

nonafiona commented Jul 31, 2017

Hi there, I don't know if this has anything to do with installation on my end or if this is a common error. This is the error that Rails keeps throwing at me:

couldn't find file 'typed' with type 'application/javascript'

Checked in these paths: /Users/Fiona/Desktop/portfolio/app/assets/config /Users/Fiona/Desktop/portfolio/app/assets/images /Users/Fiona/Desktop/portfolio/app/assets/javascripts /Users/Fiona/Desktop/portfolio/app/assets/stylesheets /Users/Fiona/Desktop/portfolio/vendor/assets/javascripts /Users/Fiona/Desktop/portfolio/vendor/assets/stylesheets /Users/Fiona/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/jquery-rails-4.3.1/vendor/assets/javascripts /Users/Fiona/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bootswatch-rails-3.3.5/vendor/assets/stylesheets /Users/Fiona/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/coffee-rails-4.2.2/lib/assets/javascripts /Users/Fiona/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/actioncable-5.0.4/lib/assets/compiled /Users/Fiona/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/turbolinks-source-5.0.3/lib/assets/javascripts /Users/Fiona/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bootstrap-sass-3.3.7/assets/stylesheets /Users/Fiona/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bootstrap-sass-3.3.7/assets/javascripts /Users/Fiona/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bootstrap-sass-3.3.7/assets/fonts /Users/Fiona/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bootstrap-sass-3.3.7/assets/images

Thank you in advance for any insight you can provide 😌💚

@GeorgioWan
Copy link
Owner

GeorgioWan commented Aug 1, 2017

Hi @nonafiona ,
Can you show the Gemfile and application.js or somewhere you require your JS ?

@nonafiona
Copy link
Author

nonafiona commented Aug 1, 2017

Hey @GeorgioWan,

Here's my Gemfile:

source 'https://rubygems.org'

git_source(:github) do |repo_name| repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/") "https://github.com/#{repo_name}.git" end

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '~> 5.0.2'
# Use postgresql as the database for Active Record gem 'pg', '~> 0.18'
# Use Puma as the app server gem 'puma', '~> 3.0'
# Use SCSS for stylesheets gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views gem 'coffee-rails', '~> 4.2'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
gem 'bootstrap-sass', '~> 3.3.6'
gem 'bootswatch-rails'
gem 'typedjq-rails'

# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 3.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platform: :mri
end

group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem 'web-console', '>= 3.3.0'
gem 'listen', '~> 3.0.5'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

and here's my application.js:

//= require jquery

//= require bootstrap-sprockets

//= require jquery_ujs

//= require typed

//= require turbolinks

//= require_tree .

@GeorgioWan
Copy link
Owner

Um, there is nothing going wrong...

Maybe try to avoid using the same file name of typed.coffee(or .js), and make sure you had bundle i .

p.s. If you need a sample code, I'll write one for you 😃

@nonafiona
Copy link
Author

Thanks, for some reason, I guess I never ran bundle install.

But I'd love some sample code to look at to compare my solution! Thanks again 😊

@GeorgioWan
Copy link
Owner

@nonafiona 🎉 🎉

I'm glad you find out the answer!!

Here is a very simple demo that how to use TypedJQ-Rails on rails5, FYR 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants