Error while installing rails and starting server - ruby-on-rails

I'm totally new to rails. I downloaded rails package from railsinstaller.org and installed it. While starting server, i got this error
"Could not find uglifier..."
Then i tried bundle install. It is not working.
Then i totally uninstalled it and installed only ruby from rubyinstaller.org. Ruby is working fine. When i tried "gem install rails", i'm getting this error
"could not download data from rubygems.org"
What i tried
1) I downloaded the rails-4.1.7.gem and tried installing it locally as show here
How can I specify a local gem in my Gemfile?
I tried gem "rails", :path => "D:\rails-4.1.7.gem"
Error: Unknown command rails
2) I tried the solution here
gem install rails doesn't work due to openssl/ETimedout in windows
But getting this exception
I cannot able to set it up. Please tell how to install rails and start the server. I'm a total newbie to rails.

Related

Trying to Install MySQL with/for Ruby on Ubuntu, keep getting an error

I am using Ubuntu 22.04.1 LTS, and I installed Ruby and Rails via rbenv as reccomended by others and the Ruby docs. I am trying to setup a MySQL server to use with an application and I first need to gem install it. Even when signed in as root, I keep getting the following error when issuing the command
gem install mysql2
error shown
I've tried un-installing and re-installing Ruby, and I've tried changing the permissions of the gems folder. Permission changes don't seem to be permanent

Ruby on rails error Could not find rake-13.0.3 in any of the sources

What is happening with rails? A couple of days ago I everything was running smoothly and now trying to spin up the server I'm getting this error
Could not find rake-13.0.3 in any of the sources
Run `bundle install` to install missing gems.
running bundle install will create a massive cache folder under vendor and I'm able to spin up the server. However, deleting this cache folder everything breaks again. I'm running rails 6.0 and ruby 2.6.1.
I had this error when I had Ruby installed via rbenv, but rails via apt-get.
Installing rails with 'gem install' instead of 'apt' made it work for me.

Error running and deploying 'People' from NetGuru Rails 4.0.3

I am trying to run https://github.com/netguru/people but keep getting issues. When I push it to heroku i get errors, when I copied the files to my projects folder and run 'rails server' I get rails server
Your Ruby version is 2.1.1, but your Gemfile specified 2.0.0
I updated the ruby version in gem file but still run into issues.
Any help would be appreciated. Running Mac OSX Mavericks
I believe you've got your answer here https://github.com/netguru/people/issues/3
try to do:
gem install bundler rails
and then just do
bundle

Debugging error in Rails app running on Webrick server

I am running a Rails app on the webrick server and wanted to get error messages to be displayed to me in the console. I installed the debugger 'gem install debugger' and the installation went off without a glitch but when I restarted the server by typing in rails s --debugger, I got:
You need to install ruby-debug to run the server in debugging mode. With gems, use 'gem install ruby-debug'
Therefore I tried installing ruby-debug gem but I got the following error:
ERROR: Error installing ruby-debug:
ERROR: Failed to build gem native extension.
/Users/Me/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
Can't handle 1.9.x yet
* extconf.rb failed *
My query is: what is going wrong with the installation? Secondly, what would be the best way for me to get error messages to be displayed to me?
For sure I'm late but just for anyone stuck on this, I had the same problem and fixed it by adding "gem 'debugger'" to the gemfile and running bundle update

Unable to start Rails server

The issue is when I try to start server with rails server command after successfully created Rails app by running rails new myapp -d=mysql. However, I cant get the server to start and it gives me the following error:
Could not find gem 'mysql2 (~> 0.2.6, runtime)' in any of the gem sources listed in your Gemfile. Run `bundle install` to install missing gems.
Then I run bundle install but could not happen.
I have installed:
Ruby 1.8.7
Rails 3.0.9 with mysql
RubyGems 1.8.7
I searched everywhere but nobody can solve my problem please help me with this issue as soon as possible. I am using Ubuntu 11.04.
Thanks in advance.
If your bundle install is saying everything is installed, try prefixing your rails command with
bundle exec rails server <other args here>
That will make sure you run the server in the context of the bundle (as defined by your Gemfile). If that fixes the problem for you, then you can either keep running the server using that command, or figure out what's wrong with your environment (might be a path issue, or you might have multiple versions of ruby or bundler installed and things aren't getting installed where you think they are)
i have reinstalled rails 4.2.4 using "gem install rails" command
and generated new project using rails new helloworld
"cd helloworld" and "rails server" would started my server.

Resources