Comments (9)
script/generate
from instiki.
Hmm, doesn't seem to work. When I run script/generate model User
I get back the following error message:
/Users/tamenze/.rvm/rubies/ruby-2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require': cannot load such file -- script/../config/environment (LoadError) from /Users/tamenze/.rvm/rubies/ruby-2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require' from script/generate:2:in <main>'
Line 2 of script/generate says require File.dirname(__FILE__) + '/../config/environment'
. In my script folder, I don't have a config folder, is that the issue?
from instiki.
Update (different errors): I found this guide with more info on the script/generate command and added the . before it to make it .script/generate
, which now gets me to a different error which I'm working through.
from instiki.
See this commit. Not all of the generators are working yet. (In particular, model
still seems to be broken.)
from instiki.
This should complete the fix. Let me know if there are further problems.
from instiki.
Thank you! The problem I'm encountering now is outside the scope of script/generate, but if you have any advice I'd love to hear it.
There's still an error when I run script/generate, but it's because I added an initializer to the app (I'm trying to install Google Omni Auth). The error message in the console is telling me:
/instiki/config/initializers/omniauth.rb:3:in
<top (required)>': undefined method application' for Rails:Module (NoMethodError)
.
The relevant line in omniauth.rb: Rails.application.config.middleware.use OmniAuth::Builder do
So now I'm looking into the methods that do exist for Rails:Module to try and find an alternate way of writing it (and i'm using Rails 4.2.6. and Ruby 2.3 btw).
To be clear, this^ came after I received a different error, with pry-rails when trying to generate the model: `/Users/tamenze/.rvm/gems/ruby-2.3.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:94:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'pry-rails'. (Bundler::GemRequireError) Gem Load Error is: uninitialized constant Rails::Railtie`
from instiki.
Still working on this problem, commented out the OmniAuth block in omniauth.rb to see what would happen. The User model generates, but without any fieldnames when I pass them in. ie: /script/generate model User provider uid name email oauth_token oauth_expires_at:datetime
creates a migration that only has:
class CreateUsers < ActiveRecord::Migration
def self.up
create_table :users do |t|
t.timestamps
end
end
def self.down
drop_table :users
end
end
When I added column names and types manually in the migration file, and then migrated, table was not added to the Schema. So there's a few problems in this path of working, I'll continue digging into them this week, but just an update in case anyone else has dealt with this or has some insight that could point me in the right direction.
from instiki.
@distler is this built on Rails 2? Can I run it on Rails 4?
from instiki.
The app is built on Rails 2. Converting to Rails 4 (or 5) would be a big task.
from instiki.
Related Issues (20)
- Invalid search expressions lead to internal error HOT 1
- View Original Page Source when Editing Page HOT 7
- Search result page broken (not valid xml) HOT 1
- Emojis in wiki pages not working when editing page HOT 5
- MySQL UTF8 not working after DB restore HOT 3
- Redirection to localhost HOT 3
- Unable to Install of Mac 10.14.6 HOT 7
- Heroku Install Error HOT 18
- Interweb links not working with [[!include web:pagename]] HOT 2
- Re: Interweb links not working with [[!include web:pagename]] HOT 5
- Minor tweaks to improve page creation workflow HOT 3
- Simple way to disable MathJax? HOT 2
- Edit on Heroku deploy results in "undefinedundefined" on sub pages HOT 2
- SVG creation does not work, Instiki 0.30.2(MML+), Heroku, HOT 6
- Running Instiki with Ruby 3.0 HOT 5
- Cache expiration race conditions HOT 15
- Missing index for wiki_references causes high loading times HOT 3
- Broken page cache expiration logic HOT 9
- Instiki Gemfile broken after release of Rack 3 HOT 2
- Dockerfile fails to build HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from instiki.