missing paperclip when i am run server - ruby-on-rails

I have problem with paperclip
sudo rails server
Could not find paperclip-3.3.1 in any of the sources
Run `bundle install` to install missing gems.
But paperclip is intalled.
Thank you.

It may be installed, but not available to your gem, or an incompatible version. Run the following commands from your app root:
bundle install
bundle exec rails s

Related

Windows, Ruby on rails bundle installer issue

I've no idea what happened, but I've started getting this error:
c:\Sites\Project>ruby bin/rails server
Your bundle is locked to rake (12.0.0), but that version could not be found in any of the sources listed in your Gemfile.
If you haven't changed sources, that means the author of rake (12.0.0) has removed it.
You'll need to update your bundle to a different version of rake (12.0.0) that hasn't been removed in order to install.
Run `bundle install` to install missing gems.
I've been using railsinstaller 2.3, and after getting it switched over to 2.2, but it is not helping.
Running bundle install produces exact same error text.
Ran
gem install rubygems-bundler
gem regenerate_binstubs
then
bundle install

Why does my rails not run?

When I run $ rails -server to start a server, there comes an error:
Could not find gem 'sqlite3' in any of the gem sources listed in your Gemfile or available on this machine.
Does that mean I did not install sqlite3? How can I resolve the issue?
First, you have to install all Gems from your Gemfile.
This can be done with bundle install or in short bundle.
If this command executed successfully, you can run your server with rails s.
But I think it's better for you, to start with a tutorial.
server and s are not a switch, but a sub-command.
Run
$ rails server
or
$ rails s
I run into this issue previously, that is because you run bundle install, miss some gems, so you can $ bundle install again,
and you can test the sqlite if is installed:
$ sqlite3 --version
If successed, you can test the rails server.

rails won't execute for newly created app

I'm struggling to get going with rails, so apologies for being a n00b. I've installed and uninstalled Ruby and all of my gems several times now and am still having problems getting rails to launch. If I do...
$ rails new sample_app
...
$ cd sample_app
...
$ bundle install
...
$ rails s
Could not find rake-10.5.0 in any of the sources
Run `bundle install` to install missing gems.
$ gem install rake -v 10.5.0
Successfully installed rake-10.5.0
Parsing documentation for rake-10.5.0
Installing ri documentation for rake-10.5.0
Done installing documentation for rake after 0 seconds
1 gem installed
$ rails s
Could not find rake-10.5.0 in any of the sources
Run `bundle install` to install missing gems.
$ rails --version
Could not find rake-10.5.0 in any of the sources
Run `bundle install` to install missing gems.
When I do gem list I see rake 10.5 is installed. I'm running Ruby 2.3.0 that I installed using rbenv. Running bundle install or bundle update as it indicates doesn't help. Suggestions?
I encountered that error before, sometimes it needs to put
gem 'rake' to Gemfile, and run bundle install.
Try running
sudo apt-get update
sudo apt-get install rake

Bundle install failing on production server

I am trying to get a rails app up in production. I have uploaded it to the server, and ssh'ed into it without a problem. When I try to run: rake db:migrate RAILS_ENV=production, I get the following error:
Could not find rake-10.0.4 in any of the sources
Run `bundle install` to install missing gems.
So, I run bundle install and get the following error:
Gem::Exception: Cannot load gem at [/usr/local/lib/ruby/gems/1.9.1/cache/rake-10.0.4.gem] in /home/root/myapp
An error occurred while installing rake (10.0.4), and Bundler cannot continue.
Make sure that `gem install rake -v '10.0.4'` succeeds before bundling.
From here, I ran gem install rake -v '10.0.4' --no-rdoc --no-ri, and it succeeded:
Yet still, bundle install fails with the same error. What can I do to fix this?
Thanks for all the help guys!
I ended up redeploying after running bundle package, and then ran bundle install --deployment on the server, and now it works.
It looks like I/bundle needed to be more explicit about where to look for the gem files :)
Bundler will try to run Rake that is in your gemfile. You need to run bundle exec rake db:migrate RAILS_ENV=production
Obviously your installation is faulty. I suggest you re-do it from scratch, and if you'd like you better use rbenv
Please check this answer Install Ruby on Rails on Ubuntu 12.04 LTS
my suggestion will you please try. if you are not root user and running this rake commmad may be it will give error. why not you try to login as root user and then place and navigate to your code. home/root/myapp to var/yourfolder/yourapp then. check which version or ruby you are using ruby -v it should be 1.9 or above and the same for rails which version of rails you are using.

Could not find gem 'sqlite3 (>= 0) ruby'

I am learning Ruby on Rails and I followed the installation of RVM and Rails from Ryan Bigg's blog and the Agile Wed Development book. This has worked previously on my PC at home, but at work it gives me the error:
depot$ rails -v
Could not find gem 'sqlite3 (>= 0) ruby' in the gems available on this machine.
Run `bundle install` to install missing gems.
I am trying to generate a scaffold but this is what i get:
depot$ rails generate scaffold Product \ title:string description:text image_url:text price:decimal
Could not find gem 'sqlite3 (>= 0) ruby' in the gems available on this machine.
Run `bundle install` to install missing gems.
I have sqlite3 installed, RVM 1.9.2-p320, and running on Ubuntu 11.04.
Any ideas what can be causing this and how to fix it?
Run
bundle install
in your Rails app's directory just like both error messages instruct you to.
i had the same issue you could try to run sudo apt-get install libsqlite3-dev and bundle install in the app directory.
You need to run it from your app directory so it can find the Gemfile to know which gems it needs to install from the Gemfile.
Yes. I was also having the same problem
when I started with rails, then when writing "rails new " I got this problem of sqlite3 . This appears due to the reason that "bundle install" is not executed. When we try to 'bundle install' then it will show some gemfile missing error. This happens due to the reason that we haven't changed the directory to that folder where we are using the rails application. So for solving this problem follow these steps :
type 'rails new app' // instead of app you can type any name you want.
now a folder named app will be created in your home.
now start new terminal.
type 'cd app'
now you can continue your work, and you will not face any such problem.

Resources