Following the 1st guide and running into issues. Installing on linux mint.
Seems like a sass-rails issue and or webpacker. How can i follow the begining tutorial from a fresh install and run into errors?!? When i start server i get this
Could not find sassc-2.4.0 in any of the sources
sassc is a gem in this case, so the issue is when bundle is running.
Looks like sassc version 2.4.0 was push very recently … and for some reason RubyGems.org has it listed as being released in the future (It’s June 1st where I am and RubyGem.org says it was released June 2nd)??
Regardless on this time paradox, I was able to pull down the same version locally and it installed properly.
Do you get any errors when you run bundle install?
So with knowing ahead of time that there’s only so much I can do over a disjointed message board to try to help… right now best I can do is ask these questions to see if there’s anything that stands out.
What version of Ruby are you running?
Are you using a Ruby version manager such as rbenv or rvm? If rbenv, for one of the first times I use rbenv on a new system, I tend to have to run $ rbenv rehash to get the binaries to play nice.
What version of Rails are you trying to run?
Can you come up with the full command you used when you ran $ rails new?
Can you share the contents of your Gemfile here?
You said that error about not having a webpacker config file came up. Is there a config/webpacker.yml file in your project? If not, then rails webpacker:install didn’t complete during app initialization. One option could be to run that manually and see if it explodes (horray front end ecosystems).
Do you happen to have node and/or yarn installed on your system?
You mentioned you couldn’t run the rails server, can you at least run a console ($ rails c)?
I feel like something during the initial app initialization got busted, but what I don’t know. The original error you posted was very much from bundler which means it’s a gem that it couldn’t find.
Another option is to run the rails new command you used again and keep a close eye if anything bombed but it decided to continue on its merry way.
Again, there’s only so much that can be done here to help without being at your system.
When i type rails --version i get a huge list of things. Which it was not doing before. So i just sudo gem install rails and its now - Rails 6.1.3.2 - Which gets ruined at some point in following this guide i guess.
I did do the webpacker:install
Yup on the guide it says to install both node and yarn. “node --version v10.19.0” “yarn 1.22.5”
Not sure if that worked. This is output.rails c
Running via Spring preloader in process 2044
Loading development environment (Rails 6.1.3.2)
irb(main):001:0>
I am following that guide i linked to the T. Really surprised that the default tutorial on the actual rubyonrails.org site does not even work… Not very noob friendly.
I really appreciate the attempt at helping. I have been digging at this for 4 days now.
Regarding you running $ rails c and getting a prompt, that at least tells me the ruby code itself works…
The fact you used sudo gem install rails tells me you’re using system Ruby. System Ruby doesn’t usually allow write access to where it stores gems (being its system ruby it’s installation dirs are owned by root). I am not sure if it would cause an issue, but it’s possible there’s permission snaffus going on. That might explain whatever the “huge list of things” you mentioned resulted in.
When I’m forced to work with system Ruby, one thing I usually do is point Ruby to install and manage gems in a directory owned by the user. Usually I put export GEM_HOME=/home/USER/.gem/ruby/2.7.0 and append /home/USER/.gem/ruby/2.7.0/bin to my $PATH in my bash profile which tells the gem binary that all gems should live in that directory which you have write access. If after refreshing your environment try to run $ bundle install to install a freash set of dependencies for your app. If bundler suddenly isn’t there, $ gem install bundler first (as it too is a gem and we told ruby gems live in a different directory now).
Another option is to stop using system ruby and use a Ruby version manager such as rbenv or rvm which manages and installs different versions of ruby that your Linux user has full access to and allows you to swap between versions quickly.
Ether way, most Ruby devs try to stay away from system Ruby unless they have no other option.
Beyond that though, other than needing to pretty much have screen share to see what it is you’re seeing, I don’t know if there’s much left I could suggest.
I looked at the guides page. Nothing seems too out of the ordinary in the steps, though I do wish it didn’t gloss over “installing Ruby” as system Ruby on distros are commonly either out of date or they don’t give global write access to gem installation.
I dont know. I literally just started and followed that tutorial on this site… You’re saying following that is not the correct way to use ruby on rails? haha
Where should i find a good tutorial to follow to get going on ruby on rails?
No, the guide should work. There’s nothing out of the ordinary I see on there that I wouldn’t follow (minus using postgresql instead of sqlite)… but I have a feeling the way Ruby (the language, not the Rails framework) is set up may be part of the issue. … maybe?