Rails server is not starting - ruby-on-rails

I installed Ruby on Rails in my Windows 8 machine and created a project. When I tried to run the application, it gives this error:
Could not find gem 'sass-rails (~> 4.0.2) x64-mingw32' in the gems available on
this machine.
Run bundle install to install missing gems.
I reinstalled the gem files and ran bundle install but received the same result.
How can I fix this?

Related

An error occurred while installing mysql2 (0.5.4), and Bundler cannot continue - in rails project

I'm trying to create a project with mysql as a database, ran command
rails new project_name -d mysql
got the following errors
Could not find gem 'mysql2 (~> 0.5)' in locally installed gems. rails importmap:install
Could not find gem 'mysql2 (~> 0.5)' in locally installed gems. Run bundle install to install missing gems.
rails turbo:install stimulus:install Could not find gem 'mysql2 (~> 0.5)' in locally installed gems.
Run bundle install to install missing gems. "
so i ran
bundle install
but it fails and at the end it tells me
An error occurred while installing mysql2 (0.5.4), and Bundler cannot continue
full error https://pastebin.com/jiX7V0Z0
I'm running windows (all answers I found were for linux or mac), any help is appreciated
Edit : as Christos-Angelos Vasilopoulos mentioned, answer in this issue worked https://github.com/brianmario/mysql2/issues/1210#issuecomment-965862944
what I did was the first two steps
1 - Start a cmd terminal and run ridk explicitely by running:
c:\your path to Ruby31-x64\ridk_use\ridk.cmd enable.
This gives you the right environment to do the rest.
2 - From that cmd, run
gem install mysql2 --platform=ruby -- --with-mysql-dir=c:/your path to Ruby31-x64/msys64/mingw64
(no particular quote was neeeded and I used forward slashes).
It is an open issue with mysql2 though there is a workaround. Check this thread from GitHub the last comment is the thing you need.

How Do You Install Missing sass-rails gem?

Hi new to stackoverflow and Ruby on Rails in general. I'm following the Kevin Skoglund Ruby on Rails 3 Essential Training online tutorial and I'm having trouble starting out. I'm trying to boot WEBrick but each time I try I get this error:
C:\Users\Matt\Documents\Sites\simple_cms>rails server
Could not find gem 'sass-rails (~> 5.0) x86-mingw32' in any of the gem sources l
isted in your Gemfile or installed on this machine.
Run bundle install to install missing gems.
What do I do to install this missing sass-rails gem, so I can boot WEBrick?
You can certainly run bundle install in your terminal, or command line, as the output suggests.
$ bundle install
If that fails, run:
$ gem install bundler
$ bundle install

could not find gem 'tzinfo-data (>=0) x86-mingw32' in the gems available on this machine. Run bundle install to install missing gems

I am new to ruby on rails development. Just started learning. I installed ruby on rails on my windows 8.1 pc with below packages kit from website.
I am using windows 8.1
Packages included are
Ruby 2.0.0
Rails 4.1
Bundler
Git
Sqlite
TinyTDS
SQL Server Support
DevKit
but when i try to run the server using command rails s i am getting below error.
could not find gem 'tzinfo-data (>=0) x86-mingw32' in the gems available on this machine.
Run bundle install to install missing gems
I tried to use bundle install command , but then i am getting below error
dl is deprecated please use fiddle
Please suggest
After so much research below are the steps you need to perform.
I am new on ruby on rails and faced so many issues during installation i dont want anyone to face this who are beginers to this
First install ssl_certificate into your ssl_certificate directory of railsinstller.
fire the command gem update --system
fire the command bundle install
install node.js os compitable installer

no metadata found in activereocrd-3.2.9.gem when running bundle install in a rails 3.2.9

am a newbie in rails. working on Windows 7, 64 bits. Installed my environment through RailsInstaller. latest version ofcourse.
When creating a new project, (keeping the gem file as default) and having the bundle install run, am getting the error
gem::package::FormatError: no metadata found in
D:/RailsInstaller/Ruby1.9.3/bin/cashe/activereocrd-3.2.9.gem
and error occurrend while installing activerecord (3.2.9), and bubndler cannot continue.
Make sure that gem install activerecord -v '3.2.9' succeeds before building.
I tried to run the gem install activerecord..as instructed still bundle install does not work and i cannot run the rails server. (rails s)
When changing the rails version in the app gem file to 3.2.8 instead of 3.2.9 everything seems to work and the rails server runs succefully. What is wrong?
I uninstalled railsinstaller and all other leftover folders.
reinstalled railsinstaller. Problem solved.

I'm having trouble running my Rails web server

I have installed ruby193 and I've installed rails via the command prompt (I also installed a DevKit). However, whenever I try the command:
rails server
I get this error:
←[31mCould not find gem 'jquery-rails (>= 0) x86-mingw32' in the gems available
on this machine.←[0m
←[33mRun `bundle install` to install missing gems.←[0m
I've tried a bundle install and it gives me an error with when trying to install the json gem. Any suggestions?
make sure in your Gemfile you are including the right gem (no misspellings, etc)
Looks like you are on Windows.
I defeated the very same problem on Windows by manually installing my gems from Gemfile (gem install gem_to_install). After successfully installing a particular gem I ran bundle check to see what else I need to install. And this way after few installed gems I ran bundle check again and saw the output The Gemfile's dependencies are satisfied.
And then server started. I wish you the same!
P.S. You can install few gems at once: gem install gem1 gem2.

Resources